Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

read instruction carefully Objectives In this lab you will practice working with Entity Framework Database First to retrieve data from a table and perform DML

read instruction carefully image text in transcribed
image text in transcribed
Objectives In this lab you will practice working with Entity Framework Database First to retrieve data from a table and perform DML operations. Problem Description You will be working a database Tech support. You got the database creation script, and the last page of this lab provides some information. You will create a Windows Forms application ProductMaintenance that lets the user maintain products. The application consists of two forms as described below. You may setup Entity Framework Core Database First in the same project (create Models folder to place generated classes in it), or if you prefer you may make a separate library class project TechSupportData. Main Form Main Form displays data of all products and allows the user to select one. Alternatively, you can allow use to select a product code from a combo box and display data if the selected product in read-only text boxes. The screenshot below uses a ListBox control to display products. If you display products in list box, know that when you use the DataSource property of the ListBox control to bind the results of a query, the control displays the result of the ToString() method for each entity. So, one way to control how an entity displays in a ListBox control is to override the ToString() method of the entity that represents Products. In the screenshot above the ToString() method uses PadRight() to align data, and the Font property of list box is set to a monospaced font (uses the same width for all characters), for example Consolas or Courier New. However, it is not critical to align displayed data into columns. User can click buttons Add, Modify, and Remove to performs DML operations. After operation, data on the main form should refresh. Exit button terminates application. Second Form When user clicks on Add or Modify, second form is displayed as modal form. When the form is used for Add it should display empty text boxes and the title should read Add Product. When it is used for modify, data of product to update should be displayed and title should read Modify Product. Add Product Product code: Name: Version: Release date: To add or modify product, user enters data and clicks OK. To cancel and go back to the main page, user clicks Cancel. The form should validate data entered by the user: - Limit the number of characters that can be entered into the text boxes so the entries don't exceed the sizes allowed by the database columns. - Release date should be a valid date. When modifying product, the Product Code field should be disabled. Do not worry about concurrency exceptions. General requirements Like in Lab 1, the look of the form is up to you, but professionalism and clarity/easiness to use will be a factor in marking. Required comments are the same as for Lab 1: - Top block comments on each code file that explains purpose of the module or class, date when created (at least month and year), and the author's name. - Each method has a comment that explains its purpose. - Each variable has a comment that explains its meaning. - Each group of statements that perform a single task has a comment that explains the task

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

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions

Question

6. How do histories influence the process of identity formation?

Answered: 1 week ago