Microsoft User Interface Process Application Block Study (3)

Source: Internet
Author: User
Application This article is about how to get a user's job after a user logs in.

In the Web interface, users will go to the welocme.aspx page with validation, creating a Carttask object first in this page:

Dim task as New carttask (Page.User.Identity.Name)


This object's new (Userlogon as String) method calls the static method Storecontrollerbase.getusertaskid to obtain the task's indication, which is a GUID class. Returns in the following code of the Getusertaskid method:

Dim Cartbo as New carttaskbusinessobject ()
TaskId = Cartbo.gettask (userName)

Three classes are defined in the Carttaskbusinessobject.gettask method:

Dim Mcustomerds as New customerds
Dim Mcustomerdalc as New CustomerDALC
Dim Mcarttaskdalc as New Carttaskdalc

Where CustomerDS is the class that holds the user information, it inherits from the DataSet class. CustomerDALC is from Basedalc (this class has not yet been studied??) ) inherited over. These two classes are manipulated for user information. Carttaskdalc is inherited from Basedalc and is operated on the tasks of the current user. The Carttaskbusinessobject.gettask method ultimately returns the user's corresponding task GUID (which is stored in the Database Carttasks table).

Then, in Welcome.aspx's Page_Load, determine if the current user has a task Guid, and if there is a "Continue existing buy process" displayed in Startbutton, "Start to A new buy process ".
Later you need to analyze the CustomerDS class and the Basedalc class, customerds Why you inherit from the DataSet class, and what Basedalc class is for.

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.