Пример #1
0
        public static void Chon(ArrayList arrayList)
        {
            int chon;

            while (true)
            {
                Menu();
                chon = int.Parse(Console.ReadLine());
                Console.Clear();
                if (chon == 6)
                {
                    break;
                }
                switch (chon)
                {
                case 1:
                    TinhLuong_BLL.NhapTinhLuong(arrayList);
                    TinhLuong_DAL.GhiFile(arrayList);
                    Console.ReadKey();
                    Console.Clear();
                    break;

                case 2:
                    TinhLuong_BLL.HienThiAll(arrayList);
                    Console.ReadKey();
                    Console.Clear();
                    break;

                case 3:
                    TinhLuong_BLL.HienThiAll(arrayList);
                    TinhLuong_BLL.TimKiem(arrayList);
                    Console.ReadKey();
                    Console.Clear();
                    break;

                case 4:
                    TinhLuong_BLL.HienThiAll(arrayList);
                    TinhLuong_BLL.Sua(arrayList);
                    TinhLuong_DAL.GhiFile(arrayList);
                    Console.ReadKey();
                    Console.Clear();
                    break;

                case 5:
                    TinhLuong_BLL.HienThiAll(arrayList);
                    TinhLuong_BLL.Xoa(arrayList);
                    TinhLuong_DAL.GhiFile(arrayList);
                    Console.ReadKey();
                    Console.Clear();
                    break;

                default: break;
                }
            }
        }
Пример #2
0
        public static void Run()
        {
            int chon;

            while (true)
            {
                Menu();
                chon = int.Parse(Console.ReadLine());
                Console.Clear();
                if (chon == 7)
                {
                    break;
                }
                switch (chon)
                {
                case 1:
                    CTCC_DAL.DocFile(ctcc);
                    CTCC_GUI.Chon(ctcc);
                    break;

                case 2:
                    GiaBan_DAL.DocFile(giaban);
                    GiaBan_GUI.Chon(giaban);
                    break;

                case 3:
                    KhoXe_DAL.DocFile(khoxe);
                    KhoXe_GUI.Chon(khoxe);
                    break;

                case 4:
                    NghiepVu_DAL.DocFile(nghiepvu);
                    NghiepVu_GUI.Chon(nghiepvu);
                    break;

                case 5:
                    NhanVien_DAL.DocFile(nhanvien);
                    NhanVien_GUI.Chon(nhanvien);
                    break;

                case 6:
                    TinhLuong_DAL.DocFile(tinhluong);
                    TinhLuong_GUI.Chon(tinhluong);
                    break;

                default: break;
                }
            }
        }