Contact Manager Part B Advanced Web-Enabled Application Development

Description

For this homework assignment, in visual studio you will continue building the multi-page, data driven Contact Manager application started in Homework 4-1A. An end-user will be able to see a list of all their contacts and be able to add new contacts, edit contact information, and delete contacts. You will complete the Contact controller (including the logic for adding, editing, and deleting contacts), the AddEdit view, and Delete view. Reference Chapter 4, as well as the Practice 4-1B exercise as needed. The topics covered in Practice 4-1B are applied in this homework assignment. For starter files, you may download and extract the following web application file provided below before you begin Homework 4-1B Contact Manager Part B. If you use the starter files provided below, and the database has not already been created on your computer, run the Update-Database command in the Package Manager Console in Visual Studio.You may use the starter application files provided in D2L to begin this assignment:HW 4-1b Contact ManagerCh04ContactManager_Start.zip

Don't use plagiarized sources. Get Your Custom Assignment on
Contact Manager Part B Advanced Web-Enabled Application Development
From as Little as $13/Page

Unformatted Attachment Preview

Chapter 4 How to develop a data-driven MVC web app
Homework 4-1b Build the Contact Manager app
In this assignment, you will continue building the multi-page, data-driven Contact Manager application you
started in Homework 4-1A. An end-user will be able to see a list of all their contacts and be able to add new
contacts, edit contact information, and delete contacts. Below are the screen prints for the entire
application to give you an overview.
For this assignment, you will complete the Contact controller (including the logic for adding, editing, and
deleting contacts), the AddEdit, and Delete views.
*Note: For this homework assignment, you may continue to work on the Ch04ContactManager application
you started in Homework 4-1A, or you may use the starter files that are provided for you in D2L. If you are
using the starter files provided in D2L, and the database has not been created on your computer, then you
will need to run the Update-Database command in the Package Manager Console.
The Home page
(both use the same view)
The Add and Edit pages
2
Specifications
1. Open the Ch04ContactManager app that you began in Homework 4-1A, or use the starter file provided for
you in D2L.
2. If you are using your application completed for Homework 4-1A, change the Linq query in the Index
method of the Home Controller to list all contacts instead of only listing the contacts who are Friends.
3. Add a new controller named ContactController to the Controllers folder (note: if you are using the
starter files provided in D2L, the ContactController is already created and ready for you to begin
coding). Modify the controller to contain code for adding, editing, and deleting a contact (See the
MovieController in Practice 2-1B for an example). When adding a new contact (in the HttpPost Save
method), set the AddDate to the current date by setting it equal to DateTime.Now before the
context.Contacts.Add(contact) line of code. An example of this code looks like the following:
contact.DateAdded = DateTime.Now;
context.Contacts.Add(contact);
4. To reduce code duplication, the Add and Edit pages should both use the same view. Create a folder
named Contact and add the AddEdit.cshtml and Delete.cshtml views to this folder. (Note: if you are
using the starter files provided in D2L, the Contact folder, AddEdit.cshtml, and Delete.cshtml files have
been created and are ready for you to begin coding). The AddEdit.cshtml view should include a dropdown for Category values. The Delete.cshtml view should display the first and last name of the contact
and ask the end user to confirm that they want to delete the contact.
5. The AddEdit view should not include the DateAdded field. That field should only be set by code in the
ContactController when the user first adds a contact.
6. The app should display the Home page if the user clicks the Cancel button when Adding, Editing, or
Deleting.
3
7. Use Bootstrap to style the views. If necessary, use a custom CSS style sheet to override Bootstrap
classes. Feel free to be creative and experiment with some bootstrap classes, CSS, and Font Awesome if
you want to make the pages look more aesthetic. When you are satisfied with your new look for the
Contact Manager application and everything is working correctly, close the app and turn in your work.
Extra Credit 1: Create a Details page
8. If the user clicks a contact’s first or last name from the Home page, the app should display a Detail page
for that contact. The Detail page should display all of the information about the selected contact
including the Firstname, Lastname, Phone, Email, Category, Organization and DateAdded.
9. The Details page should not allow the end user to edit or delete the contact.
10. The Details page should not allow the end user to change any of the information displayed on the page.
Use an html to display information.
11. The Details page should include a Home button. If the user clicks the Home button, the app should
return to the Home page.
12. Format this page in a way that is consistent with the other pages in this application.
Turn in the Contact Manager app
1. Once you are satisfied with your application, close Visual Studio, compress the Contact Manager app at
the root level, and rename the compressed folder using the following naming convention:
FirstInitial_LastName_Ch04ContactManager_PartB
For example:
M_Korzaan_Ch04ContactManager_PartB
2. Upload the renamed, compressed folder to the appropriate Dropbox in D2L.
4

Purchase answer to see full
attachment