Fast development of information management system

zhaozj2021-02-16  82

Based on the information management system of the CS / BS architecture, let the software person feel a headache, a lot of workloads, and the required project: Based on the database's query, add, update, delete, really a nightmare, because of a lot of fields Even if you use a hierarchical relationship object map, it is also a big job.

In our nearest project, there is such an example, which is a management system for student information, including scholarship, workmanship, loan, reward and punishment, etc. Student information maintenance. For the entire system query, there are many featured features (more than 70 "light loans", mainly applicable to banks to report, school internal management and maintenance), and use general development methods that need to be met. For the entire system, we have developed a DBFORM database control module, which cooperates with the interface with interfaces, and implements the field to add, the actual total code line does not exceed 20-30 rows (according to JOIN Target data) Depend

A code used to query actually use the following

The following code is when placing in the form initialization

????????????? MYDBFORM = New dbform (FormType.winform, "smis_adminLogin", "userlist");

????????????? MYDBFORM.ADDJOININFO ("DepartmentID", "DepartmentID", "CodeInstitute");

????????????? MYDBFORM.ADDJOININFO ("GroupID", "GroupID", "CodeAdMingROUP");

?????????????

????????????? MYDBFORM.INIDBFORM ();

Here are these for specific query operations:

????????????? f (newquery)

????????????? {

???????????????????????????? MYDBFORM.NEWQUERYINIT (); // Preparation for new inquiry needs to do

?????????????????? MYDBFORM.AddQueryContainer (this.gbxquery);

???????????????????

// Add to place the container for the setup control collection

?????????????}

?????????????

????????????? String selectedColumn = @ "smis_adminLogin. *, codeInstitute.DepartmentName, CodeAdmingroup.Groupname";

?????????????

?????????????

????????????? MYDBFORM.EXECUTEQUERY (SELECTEDCOLUMN, "");

The queryable data is placed in the QueryDbdata property of DBFORM, you can bind directly to the data you want to view.

If you want to perform an add / delete operation, DBFORM initialization should join the following code.

????????????? MYDBFORM.ADDMODIFYCONTAINER (GBXMODIFY); // Add to place the container for the setup control collection

????????????? MYDBFORM.BUILDMODIFYCOMMANDS ("smis_adminLogin", "Loginname");

Then it is a specific database operation:

Object adminId = mydbform.executeinsert (); mydbform.executedelete (currentuser.Userentity.loginname);

Mydbform.executeUpdate (currentuser.Userentity.loginname);

?

?

The three statements above completed the insertion, update, deletion of the database, respectively.

?

Through DBFORM, it greatly simplifies our system database development. For business planning issues when data operations, we use common relational / object mapping models, but the mapping is a small subset of databases, these are daily work. The core part and the chances of change are not large.

?

Attachment of DBFORM

?

?

转载请注明原文地址:https://www.9cbs.com/read-12329.html

New Post(0)