Exemplo n.º 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:
                    KhoXe_BLL.NhapKhoXe(arrayList);
                    KhoXe_DAL.GhiFile(arrayList);
                    Console.ReadKey();
                    Console.Clear();
                    break;

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

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

                case 4:
                    KhoXe_BLL.HienThiAll(arrayList);
                    KhoXe_BLL.Sua(arrayList);
                    KhoXe_DAL.GhiFile(arrayList);
                    Console.ReadKey();
                    Console.Clear();
                    break;

                case 5:
                    KhoXe_BLL.HienThiAll(arrayList);
                    KhoXe_BLL.Xoa(arrayList);
                    KhoXe_DAL.GhiFile(arrayList);
                    Console.ReadKey();
                    Console.Clear();
                    break;

                default: break;
                }
            }
        }
Exemplo n.º 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;
                }
            }
        }