Model type:
Add two constructor values and default values.
Remove the modellist type and use list <model> instead. You can add the list method to the corresponding model.
It is easier to use dataset for related lists.
Dal
For data reading, try {} catch {} is not required {}
You can use a custom exception handling method for database operation problems.
Use partial to separate methods with business logic from common addition, query, deletion, and modification methods
Bll
Add default constructor and corresponding Dal instance
Use partial to separate methods with business logic from common addition, query, deletion, and modification methods
UI
Set folders by module
The outermost layer only leaves public pages, such as login and errorpage.
You can use the same page for adding and editing. You can set the primary key to 0 when adding, and determine the method of calling the Dal in The bll layer.
It is best to use symmetric encryption for transmitted parameters to improve security.
Custom Exception Handling
During this period, some exceptions are thrown and cannot be thrown to the error page for handling. In fact, errors can be recorded during catch.
In this project, if it is post back, an exception occurs, and the ApplicationProgramYou cannot switch back to the error page, so use custom exception handling.
Permission Control
The operation permission and browsing are still divided into two sets of pages. However, there is an idea that the operation button can be used to determine the permissions when initializing the interface to reduce the number of pages.