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;
                }
            }
        }
예제 #2
0
 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;
 }
예제 #3
0
    /// <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);
    }
예제 #4
0
 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;
 }
예제 #5
0
 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;
 }