The following is a summary .. Thinking about a table is the most basic .. ..
Assume that the table user has two field IDs: username userpass (no less, I have never seen it before. An ID is used in a table.
.. Haha)
Next we will build our classes
Public class ubase
{
Public String ID;
Public String username;
Public String userpass;
}
------------------------------------------
Public class ubaseget
{
//////////////////////////////////////// //////////////////
/// Obtain the object
Public static user. ubase getubaseid (string ID)
Public static user. ubase getubasename (string username)
Public static user. ubase getubasedr (system. Data. datarow Dr)
}
Public class ubaseisext
{
//////////////////////////////////////// //////////////////
/// Check whether an object exists
Public static bool isextid (string ID)
Public static bool isextname (string username)
Public static bool isextnamepass (string username, string userpass)
}
Public class ubasedo
{
//////////////////////////////////////// //////////////////
/// Add deletion and modification actions
Public static void insert (user. ubase UB)
Public static void Update (user. ubase UB)
Public static void Delete (user. ubase UB)
}
Public class ubaselist
{
// Public String classid;
Public String page;
Public String pagesize = "10 ";
Public String firstpage;
Public String prevpage;
Public String nextpage;
Public String pagecount;
Public String listcount;
// The list content category is set to the top or not set to the top and the delimiter
Public String listtopstr;
Public String listloopstr;
Public String listlinemb;
Public String listlineover;
Public String liststr;
}
Public class ubaselistget
{
//////////////////////////////////////// ////////////////////
/// Obtain the list
Public static ubaselist getlist ()
Public static ubaselist getlisttopn (string topn)
Public static ubaselist getlistpagen (string pagenum)
}
------------------------------------------
Work is coming again .. Roar .. Busy .. Come back and try again .. The idea is probably like this .. Pagination depends on your needs .. The iner of the presentation layer has not been written yet, which is similar to the above .. Create a class .. Hurry up .. Haha ..