. Net L3 architecture development instance-User Registration System

Source: Internet
Author: User

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
    

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.