Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!


Murachs Visual Basic and Line Item Products Application Lab Report

Murachs Visual Basic and Line Item Products Application Lab Report

Question Description

I’m working on a computer science project and need an explanation to help me understand better.

Extra 23-1Use LINQ to create a Line Item Products application

In this exercise, you’ll use LINQ to join the data in two List() objects and then display that data in a ListView control.


Design the form


  • Open the LineItemProducts project in the Extra ExercisesChapter 23LineItemProducts directory. This project contains the Line Item Products form, along with the business and database classes and database files needed by the application.
  • Add a ListView control to the form, and set the View property of this control to Details.
  • Use the smart tag menu for the ListView control to display the ColumnHeader Collection Editor. Then, define the column headers for this control so they appear as shown above.
  • Add an event handler for the Load event of the form. Then, use the GetLineItems method in the LineItemDB class to get a List (Of LineItem) object, and store this list in a variable.
  • Define a query expression that returns all the line items from the line item list sorted by invoice ID. The select clause for this query expression should select entire line items.
  • Use a For Each statement to execute the query and load the results into the ListView control.
  • Test the application to be sure it displays the line items correctly.
  • Add a statement to the Load event handler of the form that uses the GetProducts method of the ProductDB class to get a List(Of Product) object, and store the list in a variable.
  • Modify the query expression so it joins the data in the line item list with the data in the product list and so the description field in the product list is returned instead of the product code in the line item list.
  • Modify the For Each statement so it adds the product description instead of the product code to the ListView control.
  • Test the application to be sure it displays the invoice data correctly.
  • Declare a variable outside the for each statement to hold an invoice ID, and initialize this variable to 0. Then, add code within the For Each statement that checks if the invoice ID for the current item is equal to the invoice ID in the variable you just declared. If they aren’t equal, the invoice ID, invoice date, and invoice total should be added to the List View control, and the invoice ID variable should be set to the value of the invoice ID for the current item. Otherwise, an empty string should be added to the ListView control for this field.
  • Test this change to be sure it works correctly.


Add code to display the line item data


Enhance the application to include the product description


Enhance the application so it doesn’t repeat the invoice ID

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Gold Grades only hire the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Gold Grades are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Gold Grades is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Gold Grades, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.