You program must allow adding, editing, and deleting, multiple records to/from a file (as described in the questions below) – ensure you read the entire question and understand it before writing any code.
Create an application which allows a user to store and edit gym member registration information. The data must be saved in a text file where each row represents a gym member record.
Your screen layout must match the following design:
You are required to create meaningful field names, but all field names must end with the initials of your first name and last name; for example for student John Doe the member ID field could be named “memberIdJd” where Jd is required at the end.
The following fields must be stored in each record, in the order listed (also note the format for display where required in program below):
The fields stored in the file must be separated by a semicolon “;” (delimiter).
Where required (See add/update/delete questions below) the list of records must be displayed to the screen using ONE of the following options:
The user must create the file before anything can be done (ie. Record add/update/delete)
When the program starts the user must first select “Confirm File exists”. All other options (save, delete, reload records, empty records) must be disabled,
The “file path and name” field is required - if the user selects “Confirm File exists” and the field is blank display an error stating – the “file path and name” field is required.
if the directory path is not included with the file name (eg C:\) the file must be saved in the project directory.
“Confirm file exists” must check for the file as entered in the “file path and name” field:
Any new or existing data (during an add, edit, or delete) must be updated on the list shown on screen.
Create the logic to update or add a new record to the text file.
If the record does not exist in the file (based on the member ID field), insert the record.
Otherwise if the record exists update the record with the data the user has entered.
The following constraints must be met for each screen field before saving (Add or update) see display requirements above:
Data entry fields must not be created for these calculated field below, but the fields must be displayed in the list:
Any errors (data entry or otherwise) during the insert or update, must be displayed all at once, one line per error, and give the focus to the first field in error.
The record must not be saved if the data entered has any errors (see constraints above)
If there are no errors the new information must be saved to the text file
If there are no errors the new information must also be displayed/updated in the list.
The screen list must be updated correctly to display all records with no duplication of old records previously displayed.
The fields for all records listed must be displayed in the order as listed above under “required fields” from 1-9.
Create logic to allow user to delete a record
The user must enter the member ID and click “delete” In order to delete a transaction.
If the member ID for the record to be deleted is not found – display a message to the user “Record to be deleted is not found”.
Create logic – If the user selects “Reload Records” reload all records to the grid view or rich text box (see record list display requirements).
Records must not be duplicated.
Selecting “Empty file” must remove all records from the text file and clear the rich text box or grid view.
Selecting “Exit” exits the program.
Catch all file I/O exceptions (open/read/write) and display them as error messages on the form.
All error messages must be displayed in the “Messages Area (Use text box or label to display). After the user clicks to complete an action (eg. Delete, Save, Reload Records etc) Clear all old messages before running the action for the user