Create an instance of the datagrid control on the form.

Assignment Help Basic Computer Science
Reference no: EM13952945

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 figured out how to do this.

Second, the accumulation statements must be inside the For...Next loop structure (between the For and Next statements) as follows:

For pintCount = 0 To drArray.GetUpperBound(0)

' I changed the argument to the Item collection. The argument "fldGrossPay" Will return the value

'in that index of the array.
pdlblTotalGrossPay += Convert.ToDouble(drArray_(pintCount).Item "fldGrossPay"))

Next

you can put the other two statements in this same loop instead of creating
'two more loops. Make sure to declare the variables before the loop begins.
******************************************************************

Here is the Original problem Requirments Which I have completed most all of the coding and GUI for. Just having a tough time with the Above Information. Please Help if you can. I have Saved the Payroll.MDB Data file in the bin file of the zipped Project so you can set the control instances to it on your computer. Thanks Tom
******************************************************************
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
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

In this exercise, you will create a solution that works with two tables having a master/detail relationship. The first table contains employee records and the second table contains payroll transaction records for each employee. The Figure shows the completed form for the solution.

- 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 Pavroll.zip, must exist in the same folder as the executable file. (Download the zip and extract the database file to the folder) The input form contains a list box, and a DataGrid control instance. Select employee names in the ListBox control instance. The corresponding payroll information appears in the DataGrid. As you select different employees, the payroll totals are recalculated for the selected employee.

- Start VB .NET and create a new solution named YourName_Unit3.sln, setting the drive designator as necessary.

- 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.

Attachment:- Payroll.zip

Reference no: EM13952945

Questions Cloud

Which interviewing strategies used by the interviewer : Describe one interview strategy you believe was effectively modeled. Explain why it was effective. Which interviewing strategies used by the interviewer in the media would you avoid, and why
What test statistic should be used : Consider a sample of size 5 from a normal population with a variance of 5 and a mean of zero under the null hypothesis. Find the critical values for a 0.05 two-sided significance test of the mean equals zero versus the mean dif- fers from zero.
Problem regarding the notes payable : Red Bank Enterprises was involved in the following transactions during the fiscal year ending October 31:
Current liabilities-entries and disclosure : A review of selected financial activities of Visconti's during 20XX disclosed the following:
Create an instance of the datagrid control on the form. : 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.
Prepare an investment opportunities schedule : Using the data given, prepare an investment opportunities schedule (IOS). Which projects does the IOS suggest should be funded? Does this group of projects maximize NPV? Explain.
Calculate the npv and annualized net present value : Calculate the NPV and the annualized net present value (ANPV) for each project using the firm's cost of capital of 8%. Which project would you recommend?
What is the half-width of the confidence interval : The standard hemoglobin reading for normal males of adult age is 15 g/100 ml. The standard deviation is about 2.5 g/100 ml. For a group of 36 male con- struction workers, the sample mean was 16 g/100 ml. Construct a 95% confidence interval fo..
Projected to generate cash inflows : The firm is analyzing two projects based on their RADRs. Project Sourdough requires an initial investment of $12,500 and is assigned a risk index of 6. Project Greek Salad requires an initial investment of $7,500 and is assigned a risk index of 8...

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Name and address of all the female managers

Q1: Retrieve the name and address of all the female managers Q2: Retrieve the name and address of all employees who work in the 'Research' department.

  Charts and conditional formatting

Explain what you believe to be the main business purpose of charts in Excel. Next, discuss whether or not you believe Excel would still be a useful tool if the charting features were removed from the application. Justify your response.

  Perform set operation: union, intersection, and difference.

You are to write Scheme functions in a pure functional style to perform set operation: union, intersection, and difference.

  Write guide for the organization

Write a 2-3 page report recommending style manual and/or technical/legal writing guide for the organization to use and describe the reasons for your recommendations.

  Write program determines sales person total sales and salary

Write a program that determines for each sales person their total sales and their salary

  The benefits of using slide master view in power point

What are the benefits of using Slide Master view in PowerPoint?

  Draw a flow chart, hierarchy chart

Draw a flow chart, hierarchy chart, and write pseudocode for the following problem. • A weather sensing system calculates & prints a report on the following: ? Average temperature ? Highest temperature ? Lowest temperature ?

  Importance of first designing a program using an algorithm

Programs must be very thoroughly designed before they are written. In this assignment, you will discuss the importance of first designing a program using an algorithm, pseudocode, and flowcharts before writing the actual code.

  Write a program that reads a sentace and counts the number

write a program that reads a sentace and counts the number of alpha characters using the tolower or toupper function along with the isalpha function. Then count vowels using a switch statement. Then i have to give the total number of keystrokes.

  Set operations and the logical con­nectives

A very deep connection (an isomorphism) exists between set operations and the logical con­nectives in the propositional logic.

  Briefly discuss the various organizational approaches

1) As a member of an IT staff, how can you use social media to support e-commerce? You can search business websites to find good practices of using social media in e-commerce.

  Explain intrinsic or extrinsic factors

Review your classmates' posts, and respond to at least two of your peers. Select at least one peer who noted different intrinsic or extrinsic factors than yours. Why do you think their factors are different

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd