Please write the expenses to a sequential access file where


Please write the expenses to a sequential access file, where the expense data for each individual are contained on a single line, separated by comma. For example, for an employee named JSMITH, ID 1, and using information from the example in the text, the line in the file would look like this:

1 JSMITH,SIGCSE 2013,March 6-9, Denver, CO, 190.1,250.15,675,45

Note that the city and state are separated by a comma, so you may want 2 text boxes for city and state on your form. You will need an ID text box as well as a name text box on the form to identify each line (ID text box) and to provide an employee name (name text box). If you choose to enter the ID yourself you can do so, just ensure the ID is unique.

Provide an additional list box that will be populated with the name (field(1)) in the file.

When an item is selected from the list box, populate the fields of the expense report on the form.

Create a separate form that will be used to enter new expense information. Provide 2 buttons on this secondary form:

Save data and close

Cancel and close

Close the form upon either button action, making sure to save the new data to the data file.

There is no need to avoid duplicates nor is there the need to delete lines from the file in this exercise.

There is no need to print the report as described in the original problem.

Use LINQ query in this problem

Include a File Open Dialog Box and a File Save Dialog Box appropriately deployed to allow the user to place the file in a location other than the Bin/Debug Directory.

Hints:

Use an Employee array to hold each line of data.

Add a module to the project to hold a reference to the sequential access file reader and writer

You may place the file in the Bin/Debug directory if you wish.

Solution Preview :

Prepared by a verified Expert
Computer Engineering: Please write the expenses to a sequential access file where
Reference No:- TGS01673126

Now Priced at $40 (50% Discount)

Recommended (94%)

Rated (4.6/5)