// Display details of an employee private void displayEmployeeDetails(hseEmployee employee) { dispEmpName.Text = employee.empName; dispEmpNumber.Text = employee.empNumber.ToString(); dispEmpType.Text = employee.empType; dispEmpYrs.Text = employee.empYrsService.ToString(); dispEmpSalary.Text = employee.empSalary.ToString("€#,##0.00"); if (employee is hseDoctor) { canPrescribe.Visible = true; } else { canPrescribe.Visible = false; } }
// Add an employee to the ListBox private void addEmployee(hseEmployee employee) { allEmployees.Add(employee); employeesListBox.Items.Add(employee.empName + " (" + employee.empNumber + ")"); }