Aptech Asp.net Assignments (2)

Chapters: 5, 6, 7


Chapter 5:

  1. Create a text file name users.txt contain a list of user name as following:

    quanlh
    tuanvt
    tienht
    hant
    /

    You can modify text file content as you wish.

  2. Create a form Startup.apsx as below:
    Startup.aspx

    Startup.aspx

    – Combobox should display user list in text file above
    – When you click Login, user name you select will be saved (Hint: use variable Session[“user”]) and the page redirect to inbox.aspx

  3. Create a form Inbox.aspx as below:
    Inbox.aspx

    Inbox.aspx

    – Use DataGrid to display message that other user send to you
    – Each message has a Reply button
    – When user click Reply, the page should redirect to SendMsg.aspx. Field Subject in SendMsg.aspx should display subject and prefix with RE. Combobox To in SendMsg.aspx should auto select user in From. Field Message in SendMsg.aspx should fill with Message.

  4. Create a form SendMsg.apsx as below:

    SendMsg.apsx

    SendMsg.apsx


    – From field should be read only
    – Combobox To should display user list in text file above
    – When click Send, this message should be sent to user in To field and when they login, their inbox should display the message.

  5. Send link to SendMsg.aspx; Inbox link to Inbox.aspx; Logout link to Startup.aspx:
  6. Hint:
    – Create for each user an Application object to save inbox for user
    – Use a DataTable to save data inbox. Table should has struct below
    Table name for each user according to user name:
    ID        int
    From        string
    Subject    string
    Message    string
    – This initialize code should place in Application_OnStart

Chapter 6

  1. Open form Custs.aspx in previous chapter:
    – When Save button click, check whether cookie name Custs exsited, if not, create it and add pair key/value, otherwise add pair key/value.
    – The key and value is value in Customer Name
    – Set property expire of cookie is 2 hours
  2. Open form Custs.aspx in previous chapter:
    – When Save button click, check whether cookie name Rooms exsited, if not, create it and add pair key/value, otherwise add pair key/value.
    – The key is the value in Room Number and the value is value in Price
    – Set property expire of cookie is 2 hours
  3. Create the form name Bookings.aspx as the following:
    Booking.aspx

    Booking.aspx

    – When Page_Load, read all value in cookie Cust and add to list Customer Name, and read all key name in cookie Rooms and add them to list Room Number
    – When user choose a Room Number (SelectedIndexChange), the Price should display the value corresponding with key in cookie Rooms.
    – Create RequiredFieldValidation for Form Date and To Date
    – Create CompareValidator for Form Date and To Date to check datatype enter is valid date


Chapter 7

  1. Open form Emps.aspx in previous chapter:
    – Check all validation in form if necessary.
    – When Page_Load, load data from table Depts to DropDownList Department.
    – When click Save, insert data to table Employees.
  2. Open form Custs.aspx in previous chapter:
    – Check all validation in form if necessary.
    – When click Save, insert data to table Customers.
  3. Open form Rooms.aspx in previous chapter:
    – Check all validation in form if necessary.
    – When click Save, insert data to table Rooms.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s