Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[Invoice Total Product total: 225 Discount amount $22.50 Subtotal: $202.50 Tax 7.752) $15.69 Total: $218.19 Change Percent Sales Tax Sales tax pct. 7975 OK Cancel]

[Invoice Total Product total: 225 Discount amount $22.50 Subtotal: $202.50 Tax 7.752) $15.69 Total: $218.19 Change Percent Sales Tax Sales tax pct. 7975 OK Cancel]

In this exercise, youll add a second form to an Invoice Total application that lets the user change the sales tax percent.

Open the project and change the name of the existing form

1. Open the InvoiceTotalStart project in the Assignment8\Ex3_InvoiceTotal directory.

2. Change the name of the existing form to frmInvoiceTotal.

Create the Sales Tax form

3. Add another form named frmSalesTax to the project.

4. Add a label, text box,

and two buttons to the new form and set the properties of the form and its controls so they appear as shown above.

When the user presses the Enter key, the Click event of the OK button should fire.

When the user presses the Esc key, the Click event of the Cancel button should fire.

5. Add code to get the sales tax, store it in the Tag property of the form, and set the DialogResultproperty of the form to OK when the user clicks the OK button.

Modify the code for the Invoice Total form

6. Change the SalesTax constant thats declared in the Invoice Total form so its value can be changed.

7. Add a Change Percent button to the Invoice Total form as shown above.

Then, add code that displays the Sales Tax form and gets the result when the user clicks this button.

If the user clicks the OK button on the Sales Tax form, this event handler should store the new sales tax percent in the sales tax variable and change the Tax label on the form so it displays the correct tax.

Test the application to be sure this works correctly.

8. Add data validation to the Sales Tax form to check that the user enters a decimal value between 0 and 10 (noninclusive). To make that easier, you can copy the IsPresent, IsDecimal, and IsWithinRange methods from the Invoice Total form. Test the application to be sure the validation works correctly.

image text in transcribed

Page of 49 22 Extra exercises for Murachs Vial Baric 2015 Extra 10-3 Add a second form to an Invoice Total application In this exereise, you'll add a econd form to an Invoice Total application that leta the user change the sales tax percent Invoice Totsl 121813 Open the project and change the name of the existing form 1. Open theInvoiceTotal project in the Exta Execises Chapter0voiceTotal 2. Change the name of the existing form to frmInvoice Total. Create the Sales Tax forn 3. Add another form amed fmSalesTax to tbe project. 4. Add a label, text box, and two buttons to the pew form and set the properties of the form and its controls appear as the Enter key, the Click event of the OK button should fire. When the user presses the Esc key, the Click event of the Cancel button should fire so they appear as shown above. When the user presse 5. Add code to get the sales tax, store it in the Tag of the form, and set the DialogResult property of the form to OK when the user clicks the OK button Modify the code for the Invoice Total form 6. Change the SalesTax constant that's declared in the Invoice Total form so its value can be changed. . Add a Change Perceut button to the Invoice Total form as shown above. Then, add code that dasplays the Sales Tax form and gets the result wen the user clicks this button. If the user clicks the OK button the Sales Tax form, thus event handler should store the new sales tax percent in the ales tax variable and change the Tax label on the foem so it displays the correct tax. Test the application to be sare this works corectly 8. Add data validation to the Sales Tax form to check that the user entero a decimal value between 0 and 10 (non-inclusive. To makke that easier, you can copy the aPreeent, IsDecimal, and IaWithinRange methods from the Invoice Total form Test the application to be sure the validation works correctly

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

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions

Question

Identify four applications of HRM to healthcare organizations.

Answered: 1 week ago