Home > front end >  The MVC project add and change
The MVC project add and change

Time:12-04

Query:
Paging query data
ListOrderBy (a=& gt;//a.u serTypeID) according to the character ID sorting
Skip (layuiTablePage. GetStartIndex ())//to Skip the front pages of data
Take (layuiTablePage. Limit)/article/query data on this page number
ToList ();//return the list collection

Query the airport data of the total number article
Int intTotalRow=myModel. S_UserType. The Count ();

Prepare Layui Table the required data format
LayuiTableData ()
{
Data=https://bbs.csdn.net/topics/listUserTypes,
Count=intTotalRow
};
Feature:
1, before the new data, we need to add what on the surface of the table to analyze the data, according to the data query out to the new table,
2, according to the relation of each table, sorted to form, in order to new instantiate an entity class, used to answer the charge state and display text, and then determine whether to get to the page data to the controller,
3, whether the database already exists that information, because the number is the only, so based on the input data to the serial number of the
Repository query, if return a value greater than 0 data repeat, if return value is zero, then start to new information
,


4, analysis of data which need from which form new and according to the order of new data, and then determine whether forms or data confirmed
Save success,
Update:
And modify the data, the first controller according to the view of the parameters obtained from the database click done the data page
Surface data of backfill, and then the page from the new modified data to pass through the controller and the controller in the database query out
Data repeated judgment, if there are repeat query out, will prompt the user page, and modify to fill in the blank space in
For empty, if will prompt the user for an empty page data, please fill in full, in the data does not repeat, data is not empty
Is executed to modify, modify success will return true, change failure returns false and saved into the database!
Delete:
Query need to delete the data, data is a single, use the Remove to delete the data, the data is multiple, makes
With RemoveRange to delete multiple data, delete,

CodePudding user response:

This is the "code:
 List 

No naming conventions
  • Related