Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with me this C# Project.............. Customer Entry Windows Form Project, MDI Here are the requirements for this project. Create a class called

Please help me with me this C# Project..............

Customer Entry Windows Form Project,

MDI Here are the requirements for this project.

Create a class called Customer.cs with the following String fields:

ID, FirstName, LastName, StreetAddress, City, State, ZipCode, and Phone.

Then create a GUI (Graphical User Interface - Windows Forms Project) called Project06CustomerEntry with a main form called

FrmMainMenu.cs that will be an MDI parent form of which all of the other forms will be children.

The initial size will be maximized, with no minimize button. So the user wont be able to minimize the page.

So the form properties would be:

MinimizeBox:False

MaximizeBox: False

WindowState:Maximized

This form will have a menu strip that will open up all other forms. It will have the following menu choices: Add a MenuStrip to the top of the form

image text in transcribed

with the following options (And click events that will perform the following):

1. Add Customers. The FrmCustomerEntry.cs form will have a title of Enter Customer that allows a user to enter their first name, last name, street address, city, state, zip code and phone number in text boxes (Use a drop down list for state with an initial value of Please choose a state that if they dont choose another option it will tell them that they need to. Assign the customer ID with the prefix of cust and a number of the list size + 1 padded to three places with zeroes. In other words youll assign the first customer a number of list size (0) + 1 = 1, padded to three places with zeroes, 001, and add a prefix of cust so the string ID for customer 1 will be cust001. Display the customer in a read only field that cant be changed by the user.

Here is the example how it should look:

image text in transcribed

Make sure to add the appropriate labels so they know which fields are which. When they are done typing in their information and press submit make sure all of the fields are filled in (validate the information) and if they aren't prompt the user which fields need to be filled in by using an error message that tells them specifically which fields are empty. Use an error label by each textbox to alert them of the fields not filled in. A word of advice, put the error labels on the form when you design it and hide them on page load. When you validate in the onclick for Add Customer, first of all hide all of the errors again, then go through each field checking to see if there is missing information. If there is missing information show that error label.

Here is example, how it should look like with the errors:

image text in transcribed

you should create a Boolean called valid and before validation I set it to true. Then I hide the labels for the errors. As I go through the fields if there are errors when I show the label I also set valid to false. At the end of the method if valid is still true then add the customer to customers, and clear the text boxes for more customers to be entered.

Dont forget to get a new customer id. To hide a label: LblErrorFirstName.Visible = false;

you must need to write a method called HideLabels and another called ClearFormFields. Call HideLabels from ClearFormFields, and also when you begin validation. There should be an add customer button (BtnAddCustomer) to add the customer to the list (after validation) and a clear button (BtnClear) which will clear all of the form fields. Also, have a Close button (BtnClose) that will close this form.

When a record is submitted, you will then clear all of the fields so the user can enter a new customer after alerting them that the customer has been added.

image text in transcribed

2. Display All Customers - (This will pass the List to another form called FrmDisplayAllCustomers.cs and with a title of Customer List where all of the customers will be displayed in a neatly formatted way.)

3. Clear Customers - (This will clear the current list of customers). This does not open a form. Check to see if there are customers and if there are then clear the customers displaying a messagebox saying the customers have been cleared. If there are no customers then tell the user in a messagebox that there are no customers to clear.

4. About You - (This will open a form called FrmAbout.cs with a title of About Me where you will list your first and last name along with your major and anticipated year of graduation). This will have a Close button that will just close this form.

5. Exit which will close the form and exit the program.

The Display All Users option will open a new form which will have some way to list all of the customers that have been entered along with a close button to close the form. If there are no customers entered, then this screen will let the user know.

This is what your solution should look like with all of your files:

image text in transcribed

Main Menu Add Customers Display All Customers Clear Customers About You Exit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

9 How can training be evaluated?

Answered: 1 week ago