Overall
Start with the topic
First, there must be a model. How can I perform operations without objects?
+ View code
Then there will be a sqlhelper (otherwise the database will be exhausted)
View code
Then write the data access layer (DAL ):
View code
In the write business logic layer (BLL ):
View code
Then we need to write a list page to display the data. Otherwise, how can we add, delete, and modify the data? (It seems like nonsense !)
Front-end:
View code
Background:
View code
Write and add it first! Otherwise, all the hard-coded data will be deleted!
Here, you can write the added content to the List page. It's too lazy to go back and try again.
Front-end:
View code
Background:
View code
This should be done by deleting a general handler!
View code
The last step is to modify it. This is a bit interesting.
Front-end:
View code
Background:
View code
In fact, modification and addition can completely share a page, or a div. Here I will write them separately. It's easy!
Don't forget to configure webconfig!
View code
In this way, we have achieved success!
Three Layers of handwriting-add, delete, modify, and query