The following is a three-tier architecture instance developed by the user registration system: the database base class uses the Code provided above.
1. Data Layer Development of the user registration module:
Using system;
Using system. Data;
Using system. Data. sqlclient;
Using haisky. htjob;
Using system. xml;
Namespace haisky. htjob. Accounts. accountsdata
{
Public class user: haisky. htjob. haiskydbobject
{
Public user (string newconnectionstring): Base (newconnectionstring)
{// Direct route connection string}
Public int create (string user_nm, string user_pwd)
{
Int rowsaffected;
Sqlparameter [] parameters = {New sqlparameter ("@ user_nm", sqldbtype. Char, 16 ),
New
Sqlparameter ("@ user_pwd", sqldbtype. Char, 16 )};
Parameters [0]. value = user_nm;
Parameters [1]. value = user_pwd;
Parameters [2]. Direction = parameterdirection. output;
Try
{
Runprocedure ("if_user_info", parameters, out rowsaffected );
}
Catch
{ }
Return (INT) parameters [2]. value;
}
}
}
2. User Registration business layer development:
Using system;
Using system. configuration;
Using haisky. htjob. Accounts. accountsdata;
Namespace haisky. htjob. Accounts. accountbusiness
{
Public class user: haisky. htjob. haiskybizobject