vb.net edition room Charge--to help you learn seven layer architecture (i)

Source: Internet
Author: User

I write my own computer room, look at a lot of high-level blog, all kinds of reference, the first must be tangled, now the entire room knocked out, write this blog to everyone a general, simple understanding of the seven layer, expect you to read this article, will not this tangled.

First of all, you have to read my last blog:

http://blog.csdn.net/qiumuxia0921/article/details/33738319

I'll say it again, and we'll just have to understand the package map.

First, I'll start with the oldest, simplest, and first sample login:

1. We need to know which steps login will need: Query the user table, infer whether the users exist, and add the user log in the Worklog.

2, the need for database design:

I'm not going to build a table here, so everybody's looking more familiar, right?


3. Establishment of entity

Entities are built on a table, that is, there are several fields in the table, and the loginentity and worklogentity classes of the entity have several property.

In the principle of all-encompassing, I will bask in the code, we do not bother me:


' ************************** ' file name: Userlogin ' namespace: Entity ' content: ' function: ' File relationship: ' Author: Qiu Xia ' group: Qiu Xia ' date generated: 2014-06-07 17:27: 28 ' version number: V1.0.0.0 ' changelog: ' Copyright note: ' ***************************public Class loginentity#region ' define variable ' Private _userid as Stri     ng private _level As String private _head as String private _password as String private _oldpassword as String              Private _username As String private _computer as String#end region public Shared Userhead As String ' Set global variable public Shared UserLevel As String public property UserID () As String ' to pass each entity in the T_user_dal table, the entity is Built on a table, not function Get Return _userid End get Set (ByVal value as String) _userid = val        UE End Set End Property public Property level () as String get Return _level End get Set (ByVal value as String) _level = value End Set End Property Public Property Head () as St         Ring Get   Return _head End Get Set (ByVal value as String) _head = value End Set End Property Public Property Password () as String Get Return _password End get Set (ByVal value as Str            ing) _password = value End Set End Property Public Property OldPassword () as String Get Return _oldpassword End Get Set (ByVal value as String) _oldpassword = value End Se T End Property UserName () as String get Return _username End get Set (ByVal value as String) _username = value End Set End Property Public Property computer () as Strin        G Get Return _computer End Get Set (ByVal value as String) _computer = value End Set End Propertyend Class

The above is loginentity, the following is Worklog:


' ************************** ' file name: Worklogentity ' namespace: ' Entity ' content: ' function: ' File relationship: ' Author: Qiu Xia ' group: Qiu-Summer ' build Date: 2014/6/15 11: 07:47 ' version number: V1.0.0.0 ' changelog: ' Copyright note: ' ***************************public Class worklogentity Private _userid as String Pri Vate _level As String private _logindatetime as String private _logoutdatetime as String private _computer as Str        ing Private _status As String public Shared property Login_datetime As String Public property UserID () As String Get Return _userid End get Set (ByVal value as String) _userid = value En D Set End Property, level () as String get Return _level End get Set (B Yval value as String) _level = value End Set End Property Public Property Logindatetime () as Strin  G Get Return _logindatetime End Get Set (ByVal value as String) _logindatetime =   Value End Set End Property Logoutdatetime () as String get Return _logoutdatetime End get Set (ByVal value as String) _logoutdatetime = value End Set End Property public property Compu ter () As String get Return _computer End get Set (ByVal value as String) _comput        ER = value End Set End Property Public Property Status () as String Get Return _status End Get Set (ByVal value as String) _status = value End Set End Propertyend Class

  What I'm going to say here is the global variable in loginentity, the global variable is the system just assigns it the value, he will be with the program to survive, so do not need to worry about the time will be nothing.

All of these are preparatory work, because the space, read the next article.



vb.net edition room Charge--to help you learn seven layer architecture (i)

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.