Question: using the Murach's Visual Basic 2015 book and visual Studio ( I need a snapshot of work along with the code and how to save
using the Murach's Visual Basic 2015 book and visual Studio
( I need a snapshot of work along with the code and how to save as a exe file)
Exercise 7-2 Enhance the Invoice Total application
If you did exercise 6-1 in the last chapter, this exercise asks you to add data validation and exception handling to it.
1. Copy the Invoice Total application from your C:\VB 2015\Chapter 06 directory to your Chapter 07 directory. This should be your solution to exercise 6-1 of the last chapter.
2. If your application has both a Sub procedure and a Function procedure for setting the discount percent, delete the Sub procedure.
3. Go to the Sub procedure for setting the discount percent and comment out the Else clause. That means that a discount percent is only set for customer type codes of R and C, so assume that these are the only valid customer type codes.
4. Add data validation for the customer type entry so it has to be either R or C. To do that, write a Function procedure named IsValidCustomerType that validates the entry, displays an error message if the entry is invalid, and returns a Boolean value that indicates whether the type is valid.
5. Call the IsValidCustomerType function at the start of the btnCalculate_Click procedure, and exit from the procedure if the customer type is invalid. Then, test this change.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
