private static void deleteEmp() { try { int id = UIInteraction.GetInteger("Enter an ID to delete"); component.DeleteEmployee(id); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private static void displayRec() { try { var id = UIInteraction.GetInteger("Enter the ID to search"); var emp = component.FindEmployee(id); displayEmpInfo(emp); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private static void createEmp() { try { var emp = new Employee(); emp.EmployeeID = UIInteraction.GetInteger("Enter the ID of the Employee"); emp.EmployeeName = UIInteraction.GetString("Enter the Name"); emp.EmployeeAddress = UIInteraction.GetString("Enter the Address"); emp.EmployeeDateOfBirth = UIInteraction.GetDate("Enter the date of birth in the format of dd/MM/yyyy"); component.AddNewEmployee(emp); } catch (Exception ex) { Console.WriteLine(ex.Message); } }