Computer Science Homework Solutions
Problem
#47013

database schema, which has two tables

For this project you will use the following database schema, which has two tables.
Start VB .NET

Table 1 -- Schema for the tblEmployees table

Column Name Data Type
fldEmployeeID Integer
fldName String
fldAddress String
fldCity String
fldState String
fldZipCode String


Table 2 -- Schema for table named tblPayroll

Column Name Data Type
fldEmployeeID Integer
fldPayrollID Integer
fldPayDate Date
fldGrossPay Single
fldWithholding Single
fldNetPay Single


• Configure the form so that it appears on the center of the desktop when the solution is run. Also, configure the form so that the user cannot resize it.

• Using the OleDbConnection and OleDbDataAdapter controls, create a connection to the database. Use two OleDbDataAdapter control instances to get the data from the two respective tables. Generate one DataSet based on the two DataAdapters. Write the necessary statements in the frmMain_Load event handler to populate the DataSet.

• Using the XML Designer, define a DataRelation to link the field named fldEmployeelD between the two tables.

• Create an instance of the ListBox control. Set the necessary properties so that the ListBox control will display the field fldName in the table named tblEmplovees.

• Create an instance of the DataGrid control on the form. Configure the DataGrid control instance so that it displays records from the table named tblPavroll. Use the DataRelation object to accomplish this task. Make sure that the DataGrid control instance displays the payroll records for the currently selected employee.

• Format the DataGrid so that the column header names are the same as the ones shown in the Figure. Make the background color of the selected row light blue. Also, make sure that the rows have an alternating color.

• Write the necessary code to calculate the number of transaction, total gross pay, total withholding, and total net pay for the currently selected employee. Display the results in Label control instances at the bottom at the form. Format the output as currency. Right-justify the output in the Label control instances.

• Create an Exit button for the solution. In the Click event handler for the button, display a message box to get confirmation from the user before exiting the solution.

• Create an Update button that will allow the user to save any changes made to the DataGrid back to the database. Write the necessary code for the button. Allow the user to add, change, and delete records.

Attached file(s):
Attachments
Payroll.zip  View File
Solution
What is this?
By OTA - Overall OTA Rating
Nitu Singal, MBA - 4.8/5
Purchase Cost Now
$2.19 CAD (was ~$99.75)
Included in Download
  • Plain text response
  • Attached file(s):
    • payroll.zip
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • Create a solution that works with two tables having a master/detail relationship - For this project you will use the following database schema, which has two tables. Table 1 -- Schema for the tblEmployees table Column Name Data Type fldEmployeeID Integer fldName String ...
  • Working with Database Tables - For this project you will use the following database schema, which has two tables. Table 1 -- Schema for the tblEmployees table Column Name Data Type fldEmployeeID Integer fldName ...
  • Working With Database Tables - For this project you will use the following database schema, which has two tables. Table 1 -- Schema for the tblEmployees table Column Name Data Type fldEmployeeID Integer fldName String ...
  • Payroll - • Save and execute the file named Ch09Ex1.exe. Set the drive designator as necessary. For the solution to run, the database Payroll.mdb, which can be downloaded in the following zip file named Pavrol ...
  • Need help Declaring an Array Object for Project and entering the loop structure for the calculations - First, I have not created the drArray object. I must do that before I can examine the Item collection within it. The drArray object is created by calling the GetChildRows procedure I have not f ...
Browse