Hi there,
I just saw the thread about helping with assignments but I'm hoping you will be able to share your knowledge with me on this.
We have had one week to complete this assignment and I'm beginning to worry I won't be able to finish it, I've tried to find things on the internet and I've played around with my code for hours but just cant seem to get it right. Please give me some pointers!
This is obviously using C# and we are using Windows Forms.
The purpose of the assignment is to create a prototype program to enable a large Florist’s business to handle information about their employees.
The program will be a single form that allows the user to -
1. Add an employee record
a. Employee details include: last name, first name, salary, a single telephone number (a string), date employed, job role (a char – M for manager, S for supervisor, F for florist and L for labourer).
2. Display all employees
a. List all current employees alphabetically by surname.
b. List all current employees by their job role, and within that category, alphabetically by surname.
c. Select and delete an employee record.
3. Calculate the maximum total commission for all florists. Commission is 10% of the total salary for all florists.
4. Display all of the employee’s details in a format suitable for printing.
5. All data entry must be validated and exceptions handled appropriately.
6. All displayed data must be in the appropriate format.
7. All variables must be of the appropriate data type.
8. Appropriate controls must be used on the forms (e.g. text box, list box or combo box, date time picker etc.) including tool tips on data entry fields.
9. The tab order must be controlled to guide the user through the interface when entering data and when any data entry errors occur.
10. The form must be set up so that it is positioned in the centre of the screen on start up
The thing I really want help with is putting new employee details into a listbox.
At the moment I have put the text value of all relavent textboxes into an array and then used 'listbox.items.addrange' to add the array into the listbox. The problem with this however is that in the listbox, each instance of the array is seperated in the listbox. As in the employee details are not collective so I can't sort the employees by their last names as it sorts every value alphabetically, not just the lastname. I tried putting all the employee data into one instance of an array so it is collective, though now it sits only on one line of the listbox and using '\n' doesn't work. I just want each new employee record added to the listbox to be 'one employee' as such. So sorting the employess simply sorts them by last name, and if I choose to delete an employee it deletes all the records, not just one line.
Please give me some tips, if you understood that.
I can try and explain more clearly or post the full assignment, but atm I am completely stuck!
Thanks in advance!
-Eddy