COP 4813 HW 1 (50 points)

You work in a company named Danger Zone Aviation a company which fixes jet fighter parts for the U.S. Armed Forces. The Chief Wingmen Officers (CWO) “Maverick” and “Iceman” are in charge of creating a web application to track the fixing of company parts and have asked that you lead the development.

Create a Web Form named “PartEntry.aspx” which is going to collect information on the Part that needs to be fixed.

PartForm.aspx has the following elements in the form:

Required Fields Section:

  • Client: A dropdown list of the different clients. The clients are Navy, Air Force, Army and Marines.
  • Request Order No.: A Textbox where a five-digit request order number can be entered.
  • Date Entered: A Textbox with today’ s date already populated, but disabled.
  • Description: A Textbox that can take a description of 50 characters.
  • Part No: A Textbox that takes 8 alphanumeric characters.
  • Serial: A Textbox that takes a 5-digit serial number.
  • Manufacturer: A dropdown list with manufacturers to choose from, which are Honeywell, Boeing, and Lockheed.
  • Model: A Textbox that takes a model of 25 characters.

Optional Fields Section:

  • Instructions: A multi-line textbox that takes 100 characters.
  • Troubled Reported: A multi-line textbox that takes 100 characters.
  • Master Contract: A checkbox control which is checked if it is part of a master contract.

Save Button and Other Fields

  • Save button: A button with the text“Save” on it.
  • SavedValues hidden field: This will contain string of all the saved values.
  • SavedValues Textbox: This will initially be set to visible= ”false” and be set to visible=”true” when the button is pressed.

Any control listed here except the hidden field and the Save button should have an associated label with it. All the controls should be server side ASP.NET controls. The labels and controls should line up properly. (Hint: Use a borderless table to line up the controls).

Markup

The markup should be divided as following:

1)Once container control should have the following welcome message styled in italic, with the last sentence in bold. There should be a 1 point black border around the message. The background for this message should be of color white.

Welcome Message:

Welcome to Danger Zone Aviation’s Part Entry page. All information entered will be used for mechanical work order inspections. It is extremely important that all information entered is verified as factual. Please review all the information entered.Any information wrongfully entered could cause Danger Zone Aviation to be financially liable in the event of a problematic part.

2)Another container containing the following required controls (each set of controls on its own line):

  1. Client, Request Order No. , Date Entered
  2. Description, Part No, Serial, Manufacturer
  3. Manufacturer, Model

3)Another container containing the following optional and save controls (each set of controls on its own line):

  1. Instructions
  2. Trouble Reported
  3. Master Contract checkbox

4)The Save Button and SavedValues fields should be lastly on the div but outside the controls.

For the entire page, the font should be Arial and the text in the page should all be the color #000066 and the background of the page should be the color #efeff5.The page should have a centered image with the attached danger zone logo on the top.

All your styling should be done in another file called DangerZone.css. Import this style into your web form and add all the styling there. Make sure allow enough spacing between your elements so they appear properly to the user.

Functionality

When the Save Button is clicked, the OnClick event on the property will call a method named SavePart().SavePart() will create a C# Dictionary Collection (similar to an Array List, but stores the values in Keys and Values).

Once we have saved all the values, we will Serialize the data dictionary using a JSON.NET library into our HiddenField, which will now store all the saved values.

JSON.NET Documentation (Note you will have to bring in the namespace “Newtonsoft.Json” into your code behind class to use it.

You will save the JSON string that contains all your values into:

-The SavedValues Hidden Field.

-The SavedValuesTextBox and make the TextBox’s Visible property be set to true.

In addition, once you have hit the Save button, check to see if all the required fields have been populated. You can leverage the String class’s IsNullOrEmpty method as such

if(!String.IsNullOrEmpty(txtBox.Text))

{

//My Textbox's text value is not null or Empty

}

In combination with logical operator such as “&” to check the control values.

If all the required fields have been populated, hide the welcome message and display the following message instead:

Your entries have been saved, you can be my wingman anytime.

Else, have the display the following message

The required fields in the first section have not been populated. Please try again.

Testing

You can test your web application by entering test data and clicking save. Once everything is saved, you can verify the TextBox values on the screen and the HiddenField Value by using your browsers developer tools.

See the Inspecting the DOM and Styles section in

Deliverables

-You will put the following header on your PartEntry.aspx.cs file and DangerZone.css.

/**

* Name: [FirstNameLastName]

* Panther Id: [Id]

* Assignment: [Assignment Number]

* Class: COP 4813

* Semester: [Semester]

*

* I attest that this is my original work

* - [Name]

*/

-These are the only files you will need to modify. Please compress your website solution an email it to me when done.

-This is an individual project but feel free to use all the web sites available to you (W3Schools, StackOverflow, etc).

-Collaboration takes place between developers all the time. It is ok to collaborate with your classmates when facing a challenging issue. For example, asking the question “I’m trying to center the logo but I’m not successful, what techniques can be used?” is a fair question. However, asking “Can you send me the code to center the logo?” is NOT a fair question and thus not allowed.