logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Oscar BoltsGeneral article writing
(5/5)

515 Answers

Hire Me
expert
Ashok GehlotComputer science
(5/5)

887 Answers

Hire Me
expert
Adam CooperrFinance
(5/5)

818 Answers

Hire Me
expert
Yehuda ThomsonPsychology
(5/5)

722 Answers

Hire Me
Visual Studio Programming

you will add a Toolstrip to the Product Maintenance form of extra that provides for retrieving a product based on its code and for retrieving all products. In addition, you will format the data in the Unit Price text box.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Extra 15-1   Add a parameterized query to the Product Maintenance form

In this exercise, you’ll add a Toolstrip to the Product Maintenance form of extra exercise 14-2 that provides for retrieving a product based on its code and for retrieving all products. In addition, you’ll format the data in the Unit Price text box.

 

  1. Open the ProductMaintenance project in the ProductMaintenance directory. Then, increase the height of the form and move the controls on the form down to make room for another Toolstrip control.
  2. Use the smart tag menu for one of the bound controls to add a parameterized query named FillByProductCode that will retrieve the row for a product with the specified product code. Add an If statement to the Try block that was generated that checks the Count property of the binding source to be sure that the product is found. If it’s not found, an error message should be displayed. Test the application to be sure this works.
  3. Display the Items Collection editor for the Toolstrip control you just created. Then, modify the control so it appears as shown above.
  4. Create an event handler for the Click event of the Get All Products button. Then, copy the statement in the Load event handler for the form that loads data into the Products table to the Click event handler, and delete the Load event handler so no data is loaded when the application starts. Test the application to see how this works.
  5. Add an Imports statement for the System.Data.SqlClient namespace to the form. Then, add a Try…Catch statement to the Click event handler you just created that catches any SQL exceptions that occur. If an exception occurs, the catch block should display the exception number and message in a dialog box whose caption is the type of exception.
  6. Format the Unit Price text box so the data it contains is displayed as currency with two decimal places. Then, test the application one more time.

 

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme