The SPL data operation layer and model layer are complete. According to the UML: Java Program The author's DX practices in the member guide pick out the most important ideas. Let's run the program first. In the past few days, I have been playing the frozen throne, and I am not very familiar with SPL, therefore, the progress is slow, but most of the functions are completed.
In addition to the two above, there are other projects that have also made some progress. The tool part is to directly add 1.1 German to the project. In addition, a Config project is added, this is used to read the parameter settings. The data layer interface is naturally
I have been using SPL over the past few days and found that it is really easy to use. Now I only wrote two stored procedures during paging, and other operations are completed using the SPL entity, below are some representative posts Code If you are interested in SPL, visit
Http://www.cnblogs.com/tintown/category/12787.html
The following code snippet is selected from stella2.spldal. theme. Note that these programs are not completed and may be modified later.
/// <Summary>
/// Obtain the bamboo list
/// </Summary>
/// <Param name = "themeid"> part number </param>
/// <Returns> bamboo list </returns>
Public stella2.model. Managers getmanagers (INT themeid)
{
************
// Query the user ID and part number in charge from the Manager table
Query Q1 = new query (typeof (managerentity ));
Q1.addattrietype (attributetype. All );
// Query the user name from the user table
Query q2 = new query (typeof (userentity ));
Q2.addattrity (userentity. _ name );
// Joint query by user ID
Q1.addjoinquery (managerentity. _ userid, q2, userentity. _ id );
Datatable dt = q1.execute ();
Model. Managers MS = new stella2.model. Managers ();
Foreach (datarow DR in DT. Rows)
{
Model. Manager M = new stella2.model. Manager ();
M. userid = (INT) Dr [managerentity. _ userid];
M. themeid = (INT) Dr [managerentity. _ themeid];
M. Name = (string) Dr [userentity. _ name];
Ms. addmanager (m );
}
Return MS;
}
/// <Summary>
/// Add bamboo
/// </Summary>
/// <Param name = "man"> </param>
Public void createmanager (stella2.model. Manager man)
{
// ************** Use transactions **************
// Add a record to the Manager table
Transaction TRAN = new transaction ();
Managerentity me = new managerentity ();
Me. userid = man. userid;
Me. themeid = man. themeid;
Tran. addsaveobject (me );
// Change the User Role
Userprofileentity up = new userprofileentity ();
Up. userid = man. userid;
Up. Retrieve ();
Up. Role = (INT) config. Role. Manager;
Tran. addsaveobject (up );
Tran. Process ();
}