InHow to design a three-tier architecture system that is more "Object-Oriented" (1)In this article, I used "employee information management" as a case to introduce some skills in the three-tier architecture system. For example, the attribute of "Data Object" does not need to correspond to the fields in the data table one by one. Instead, you can use the object as the attribute of another object to easily solve problems such as multi-Table Association.
TheSource codeAnd images, I have mentioned that they are developed by myself."EASYCODE. netCodeGenerator"The Design and generation will share with you today: how to use EASYCODE. net code generator. In 10 minutes, the two are based on ASP. net and winform three-tier architecture system prototype.
The preceding "employee information management" is used as an example. There are two objects in the system: "employee information" and "Department Information". The database has two tables: "employee" and "department, the attributes of related objects are defined as follows:
Employee information (employee ):Automatic ID, employee ID, name, gender, birth date, ID card number, nationality, political outlook, marital status, domicile, department, current residential address, graduation School, Major, graduation Date, degree, contact number, urgent contact, urgent phone number
Department Information ):Automatic ID, Department name, Manager name, Department phone number, remarks
Two functional modules are created to add, delete, modify, and query "employee information" and "Department Information" respectively. The "employee information" Object requirements:
1. The "department" is displayed as the "department name" in Chinese characters on the interface, and the database contains an integer number;
2. "gender" is displayed as "male/female" on the interface, and "1/2" of integer data is stored in the database ";
3. Select "department" and "gender" in the drop-down box on the editing page;
4. The designed system supports both sqlserver and access. You only need to modify the configuration file when switching the database.
1. download the latest version"EASYCODE. Net code generator"Register a new user and install the free ASP. NET and winform license according to the interface prompt;
2. Use sqlserver to create a blank database named hrsystem;
3. Create a 2000/2003-format database using access. The database file name is hrsystem. MDB.
II. Specific video implementation
We recommend that you play the video in full screen mode. If the network conditions permit, you can click the "UHD" button in the lower-right corner of the video frame to view the video in UHD mode.