public virtual void View() { while (true) { ManagerEnum choice = RenderMenu(); switch (choice) { case ManagerEnum.All: GetAll(); break; case ManagerEnum.Add: Add(); break; case ManagerEnum.Edit: Edit(); break; case ManagerEnum.Delete: Delete(); break; case ManagerEnum.Exit: Environment.Exit(0); break; } } }
public Employee(int id, string name, string gender, int phone, int age, StatusEnum status, ManagerEnum manager) { ID = id; Name = name; Gender = gender; Phone = phone; Age = age; Status = status; Manager = manager; }
/// <summary> /// 外部通过该方法获取字典中的Manager,以BaseManager的类型返回,获取后要进行强制类型转换 /// </summary> /// <param name="managerName"></param> /// <returns></returns> public static BaseManager GetManager(ManagerEnum managerName) { if (managerDict.Count <= 0) { InitDict(); } BaseManager manager; managerDict.TryGetValue(managerName, out manager); return(manager); }
public RegularEmployee(int id, string name, string gender, int phone, int age, StatusEnum status, ManagerEnum manager, string title, double salary) : base(id, name, gender, phone, age, status, manager) { Title = title; Salary = salary; }
public Contractor(int id, string name, string gender, int phone, int age, StatusEnum status, ManagerEnum manager, double rate, double days) : base(id, name, gender, phone, age, status, manager) { DailyRate = rate; DaysWorked = days; }