(solution) CSCI 322 Fall 2 Homework – Unit 7 Homework 7 Learning Outcomes

(solution) CSCI 322 Fall 2 Homework – Unit 7 Homework 7 Learning Outcomes

Hello, you have helped me before and have all my project data. I have one more assignment, and hope that you can finish it asap. or at least part of it. I’d really appreciate that. 

CSCI 322 Fall 2 Homework ? Unit 7 Homework 7
Learning Outcomes 1. Create web page that edits data with the SqlDataSource control and Data controls such
as the GridView, DetailsView, and FormView, and list controls.
2. Customize the data controls, including the format and style and skins of the data
controls.
********************** Read the general directions for homework in the Unit 1 Module! ********************** Part 1
Learning Outcome 1. Create web page that edits data with the SqlDataSource control and Data controls such as
the GridView, DetailsView, and FormView, and list controls
Directions
A) Make a copy of your Homework project from last week to keep as your backup. The backup will
not be used this week! It?s for your own use. Open the project from last week?s Homework
project in Visual Studio. Remember, you will use this project every week!
a. In the main menu, for each page, make sure there is a link to the page in the main sitemap
file so that the links will be displayed in the main menu in the Database section of the menu.
Make sure the menu is formatted so that it is easy to read and well-styled. b. Make sure you have completed Part 1 in last week?s homework which included creating 5
tables: Customers, Categories, Products, Orders and ProductOrders with the fields listed in
the assignment! Last week you wrote SQL statements to select, insert, update and delete
data from your database. You need to be able to manage the database tables from a web
page. To do this, in this assignment you will use some of the common data controls within
ASP.NET. CSCI 322 Fall 2 Homework BINDING TO A DROPDOWN LIST CONTROL
1. Create a page named petDDLCustomers.aspx with the main menu displayed as List
Customers.
2. Drag the SQLDataSource control on the page and configure the control as directed in the
lessons.
3. The query should retrieve all the records in the Customers table, but only retrieve the
customerID, firstname and lastname fields. (Note that you may have used different field names
and so adjust the query as needed.)
4. Bind this list to a dropdownlist server control.
a. You will have to drag and drop a dropdownlist control to the web page. Then, select the
data source as the SQLDataSource1 control b. The displayed text should be the [lastname, firstname] where there is a comma and
space between the names. The value should be the customerID
c. Change the auto-submit feature to be on, so when you click on the selection and
make a change, the information is submitted. BINDING TO A DATALIST CONTROL
1. Create a page named petDataList.aspx with the menu displayed as Update Pets For Sale.
2. Drag the SQLDataSource control on the page.
a. The SQL statement should retrieve all of the products from the products table that are
also in the Pets For Sale category. b. So you have to make sure to select the value that represents the Pets For Sale category
(Check the ID in the categories table has that option and that you have actually values in
the products table with a category ID that matches the Pets For Sale category ID!)
3. In the design view, drag and drop a DataList control on the page.
a. Bind the DataList control to the SQLDataSource control as you did in previous
exercises. b. Configure the control?s appearance using AutoFormat or the properties window.
c. Display the data returned in two columns in the browser. (TIP: review the references!) References: http://www.w3schools.com/aspnet/aspnet_datalist.asp Read about ItemTemplate, as
well as the properties sucj as RepeatDirection, RepeatLayout and RepeatColumns. CSCI 322 Fall 2 Homework BINDING TO A GRIDVIEW CONTROL ? Creating a Master-Details Page
This is sometimes called a master-details page.
1. Create a page named petGridView.aspx with the main menu displayed as Update Customers.
2. Drag the SQLDataSource control on the page and configure the control as directed in the
lessons.
3. The query should retrieve all the records in the Customers table, but only retrieve the
customerID, firstname and lastname fields. (Note that you may have used different field names
and so adjust the query as needed.)
4. Bind this list to a dropdownlist server control.
a. You will have to drag and drop a dropdownlist control to the web page. Then, select the
data source as the SQLDataSource1 control b. The displayed text should be the [lastname, firstname] where there is a comma and
space between the names. The value should be the customerID
c. Change the auto-submit feature to be on, so when you click on the selection and
make a change, the information is submitted. 5. Create the second SQLDataSource control.
a. Drag a second SQLDataSource control on the page and configure the control as you
did earlier. b. Create the query to retrieve all customer orders from the ProductOrders table, for that
customer. (Note that this means the ProductOrders table should have had a customerID
field to associate the two tables.)
c. You will allow the customerID value, to be retrieved from the dropdownlist control. (TIP:
You will need to use the WHERE button and build the WHERE clause. Select the value
from the dropdownlist control.) d. You will need to enable the ability to update the table.
6. Bind this SQLDataSource control to a GridView control.
a. You will have to drag and drop the GridView control to the web page. Then, select the
data source as the SQLDataSource2 control. b. Configure Allow the user to update but not delete this order as shown in the lesson
and book. (Note: If you wanted to make changed, the data in the Orders table would
also need to be updated.) CSCI 322 Fall 2 Homework References:
? DataSource Controls Overview – https://msdn.microsoft.com/enus/library/ms227679(v=vs.110).aspx ? GridView ? look at the bottom of the page too, and the exampleshttps://msdn.microsoft.com/en-us/
library/system.web.ui.webcontrols.gridview(v=vs.110).aspx ? Data Toolbox Controls – https://msdn.microsoft.com/enus/library/s1c14y5c(v=vs.100).aspx and https://msdn.microsoft.com/enus/library/ms247243(v=vs.100).aspx ? Formatting the GridView https://msdn.microsoft.com/en-us/library/aa479342.aspx is an
older version but most of the formatting styles and templates still applies. BINDING TO A DETAILSVIEW CONTROL
1. Create a page named petDetailsView.aspx with the menu displayed as Update Pet
Accessories.
2. Drag the SQLDataSource control on the page.
a. The SQL statement should retrieve all of the products from the products table that are
also in the Pet Accessories category. (So you want to edit the products, but only those
that are also in Pet Accessories.) b. So you have to make sure to select the value that represents the Pet Accessories
category (Check the ID in the categories table has that option and that you have actually
values in the products table with a category ID that matches the Pet Accessories
category ID!)
3. In the design view, drag and drop a DetailsView control on the page
a. Bind the DetailsView control to the SQLDataSource control as you did before 4. Configure the DetailsView to allow you to manage the data (insert, update, delete). References: https://msdn.microsoft.com/en-us/library/s3w1w7t4(v=vs.100).aspx CSCI 322 Fall 2 Homework BINDING TO A FORMVIEW CONTROL
1. Create a page named petFormView.aspx with the menu displayed as New Customers
2. Drag the SQLDataSource control on the page and configure the control.
a. The SQL statement should retrieve all of the customers from the customers table. 5. In the design view, drag and drop a FormView control on the page
a. Bind the FormView control to the SQLDataSource control as you did before 6. Configure the FormView to allow you to manage the data (insert, update, delete).
Reference: https://msdn.microsoft.com/en-us/library/ms227992(v=vs.100).aspx
Part 1 Submission
1. There are 5 pages. Place a screen shot of the each page in markup view showing all of the
controls (SqlDataSource and the data controls), and paste the images into Part 1 the Word
document.
a. You may simply copy and paste the code too. b. Please make sure the font is 10pt.
c. Make sure that the page name is at the top of the markup. 2. Place a screen shot of the each page in the browser, showing the fields in edit mode, and
paste the images into Part 1 the Word document. Part 2
Learning Outcome
2. Customize the data controls, including the format and style and skins of the data controls
Directions
1. Create a web page named petFormatGridView.aspx that allows you to display all of the customer
data. You may simply copy and paste the code too. Please make sure the font is 10pt. Make sure
that the page name is at the top of the markup. Name the page in the menu, List All Customers CSCI 322 Fall 2 Homework 2. It?s your task to create the SqlDataSource control and bind it to a GridView control as you did
before.
3. Configure your GridView to be formatted using Skins and Templates
a. Make sure to use more than just auto format and styles! Again, refer to your lessons and
book for assistance and the link in the references previously provided. b. Use skins, styles and GridView templates to format the control so it matches your theme in
the web site.
Create a skin named gridview.skin and place it in your default theme folder you created in
an earlier week. Create the skin inside the gridview.skin file. c. d. Configure the skin to modify the properties of the GridView.
Part 2 Submissions
1. Take screen shots of the petFormatGV.aspx in markup code and insert in Part 2 of the Word
document.
2. Take screen shots of the GridView.skin in markup code and insert in Part 2 of the Word
document.
3. Place a screen shot of the page in the browser, showing the fields in insert mode, and paste
the image into Part 1 the Word document.
4. Copy the code from the GridView.skin file you edited and insert in Part 2 of the Word document
Grading Criteria
Part
Part 1
Create web page that
edits data with the
SqlDataSource control
and Data controls such
as the GridView,
DetailsView, and
FormView, and list
controls ULO Meets Does not Meet No
Evidence Created only three of the
pages correctly Created only
two or less of
the pages
correctly * 45 30 0 Created each of the pages and they all worked. 1 ?
?
?
?
? Points
Part 2
Customize the data
controls, including the
format and style and
skins of the data
controls Exceeds petDDLCustomers.aspx (List Customers)
petDataList.aspx (Update Pets For Sale)
petGridView.aspx (Update Customers)
petDetailsView.aspx (Update Pet
Accessories)
petFormView.aspx (New Customers)
75 (15 points per page) 2 Formatted significantly the data control using
templates and skins
petFormatGV.aspx (List All Customers) Formatted the data
Formatted the
control using skins but
data control
not templates. Minimal
using styles or
use of skins (such as less
used Auto
than 5 properties
Format
configured in the skin) * Points 25 20 15 0 Total 100 64 45 0