public static void MenuQuanLiThucDon() { int chon; do { Console.WriteLine("\t\t\t |==============================Quan Li Thuc Don===============================|\n"); Console.WriteLine("\t\t\t | 0. Quay Lai |\n"); Console.WriteLine("\t\t\t | 1. Thuc Don |\n"); Console.WriteLine("\t\t\t | 2. Them Mon |\n"); Console.WriteLine("\t\t\t | 3. Xoa Mon |\n"); Console.WriteLine("\t\t\t | 4. Sap Xep |\n"); Console.WriteLine("\t\t\t | 5. Tim Kiem Theo Khoang Gia |\n"); Console.WriteLine("\t\t\t | 6. Thoat |\n"); Console.WriteLine("\t\t\t |===================================CHOOSE====================================|\n"); Console.WriteLine("Ban Chon: "); chon = int.Parse(Console.ReadLine()); try { switch (chon) { case 0: QuanLiQuan.MenuQuanLiQuanCaPhe(); break; case 1: QuanLiThucDon.ThucDon(); break; case 2: QuanLiThucDon.MenuThem(); break; case 3: QuanLiThucDon.MenuXoa(); break; case 4: QuanLiThucDon.MenuThuTuSapXep(); break; case 5: QuanLiThucDon.MenuTimKiem(); break; case 6: Environment.Exit(0); break; default: Console.WriteLine("Vui Long Nhap Lai"); break; } } catch (System.FormatException) { Console.WriteLine("Vui Long Nhap Chu So"); } }while(chon != 0 || chon != 7); }
public static void MenuQuanLiQuanCaPhe() { int chon; do { Console.WriteLine("\t\t\t |=============================Quan Li Quan Ca Phe=============================|\n"); Console.WriteLine("\t\t\t | 0. Quan Li Nhan Vien |\n"); Console.WriteLine("\t\t\t | 1. Quan Li Ban |\n"); Console.WriteLine("\t\t\t | 2. Quan Li Bo Phan |\n"); Console.WriteLine("\t\t\t | 3. Quan Li Thuc Don |\n"); Console.WriteLine("\t\t\t | 4. Quan Li Hoa Don |\n"); Console.WriteLine("\t\t\t | 5. Thoat |\n"); Console.WriteLine("\t\t\t |===================================CHOOSE====================================|\n"); Console.WriteLine("Ban Chon: "); chon = int.Parse(Console.ReadLine()); try { switch (chon) { case 0: QuanLiNhanVien.MenuQuanLiNhanVien(); break; case 1: QuanLiBan.MenuQuanLiBan(); break; case 2: QuanLiBoPhan.MenuQuanLiBoPhan(); break; case 3: QuanLiThucDon.MenuQuanLiThucDon(); break; case 4: QuanLiHoaDon.MenuQuanLiHoaDon(); break; case 5: Environment.Exit(0); break; default: Console.WriteLine("Vui Long Nhap Lai"); break; } } catch (System.FormatException) { Console.WriteLine("Vui Long Nhap Chu So"); } }while(chon != 0 || chon != 5); }
public static void MenuThem() { int chon; do { Console.WriteLine("\t\t\t |===================================Them Mon==================================|\n"); Console.WriteLine("\t\t\t | 0. Quay Lai |\n"); Console.WriteLine("\t\t\t | 1. Thuc An |\n"); Console.WriteLine("\t\t\t | 2. Thuc Uong |\n"); Console.WriteLine("\t\t\t | 3. Thoat |\n"); Console.WriteLine("\t\t\t |===================================CHOOSE====================================|\n"); Console.WriteLine("Ban Chon: "); chon = int.Parse(Console.ReadLine()); try { switch (chon) { case 0: QuanLiThucDon.MenuQuanLiThucDon(); break; case 1: QuanLiThucDon.ThemThucAn(); break; case 2: QuanLiThucDon.ThemThucUong(); break; case 3: Environment.Exit(0); break; default: Console.WriteLine("Vui Long Nhap Lai"); break; } } catch (System.FormatException) { Console.WriteLine("Vui Long Nhap Chu So"); } }while(chon != 0 || chon != 3); }
public static void MenuTimKiem() { int chon, Gia1, Gia2; do { Console.WriteLine("\t\t\t |===================================Tim Kiem==================================|\n"); Console.WriteLine("\t\t\t | 0. Quay Lai |\n"); Console.WriteLine("\t\t\t | 1. Thuc Don |\n"); Console.WriteLine("\t\t\t | 2. Thuc An |\n"); Console.WriteLine("\t\t\t | 3. Thuc Uong |\n"); Console.WriteLine("\t\t\t | 4. Thoat |\n"); Console.WriteLine("\t\t\t |===================================CHOOSE====================================|\n"); Console.WriteLine("Ban Chon: "); chon = int.Parse(Console.ReadLine()); try { switch (chon) { case 0: QuanLiThucDon.MenuQuanLiThucDon(); break; case 1: Console.WriteLine("Gia 1: "); Gia1 = int.Parse(Console.ReadLine()); Console.WriteLine("Gia 2: "); Gia2 = int.Parse(Console.ReadLine()); List <ThucDon> lTD = QuanLiThucDon.TimKiemThucDonTheoKhoangGia(Gia1, Gia2); if (lTD.Count != 0) { Console.WriteLine($"Danh Sach Mon Gia Tu {Gia1} - {Gia2}: "); Console.WriteLine("\t\t\t Ten Mon | Gia | Tinh Trang | Thoi Diem Ban | Loai"); Console.WriteLine("\t\t\t ------------------------------------------------------------------------------\n"); lTD.ForEach(x => x.HienThi()); } else { Console.WriteLine($"Khong Co Mon Nao Trong Khoang {Gia1} - {Gia2}"); } break; case 2: Console.WriteLine("Gia 1: "); Gia1 = int.Parse(Console.ReadLine()); Console.WriteLine("Gia 2: "); Gia2 = int.Parse(Console.ReadLine()); List <ThucAn> lTA = QuanLiThucDon.TimKiemThucAnTheoKhoangGia(Gia1, Gia2); if (lTA.Count != 0) { Console.WriteLine($"Danh Sach Thuc An Gia Tu {Gia1} - {Gia2}: "); Console.WriteLine("\t\t\t Ten Mon | Gia | Tinh Trang | Thoi Diem Ban | Loai"); Console.WriteLine("\t\t\t ------------------------------------------------------------------------------\n"); lTA.ForEach(x => x.HienThi()); } else { Console.WriteLine($"Khong Co Thuc An Nao Trong Khoang {Gia1} - {Gia2}"); } lTA.ForEach(x => x.HienThi()); break; case 3: Console.WriteLine("Gia 1: "); Gia1 = int.Parse(Console.ReadLine()); Console.WriteLine("Gia 2: "); Gia2 = int.Parse(Console.ReadLine()); List <ThucUong> lTU = QuanLiThucDon.TimKiemThucUongTheoKhoangGia(Gia1, Gia2); if (lTU.Count != 0) { Console.WriteLine($"Danh Sach Thuc Uong Gia Tu {Gia1} - {Gia2}: "); Console.WriteLine("\t\t\t Ten Mon | Gia | Tinh Trang | Thoi Diem Ban | Loai"); Console.WriteLine("\t\t\t ------------------------------------------------------------------------------\n"); lTU.ForEach(x => x.HienThi()); } else { Console.WriteLine($"Khong Co Thuc Uong Nao Trong Khoang {Gia1} - {Gia2}"); } lTU.ForEach(x => x.HienThi()); break; case 4: Environment.Exit(0); break; default: Console.WriteLine("Vui Long Nhap Lai"); break; } } catch (System.FormatException) { Console.WriteLine("Vui Long Nhap Chu So"); } }while(chon != 0 || chon != 4); }
public static void MenuSapXep(int flag) { int chon; do { if (flag == 1) { Console.WriteLine("\t\t\t |===============================Sap Xep Tang Dan==============================|\n"); } else if (flag == 2) { Console.WriteLine("\t\t\t |===============================Sap Xep Giam Dan==============================|\n"); } Console.WriteLine("\t\t\t | 0. Quay Lai |\n"); Console.WriteLine("\t\t\t | 1. Thuc Don |\n"); Console.WriteLine("\t\t\t | 2. Thuc An |\n"); Console.WriteLine("\t\t\t | 3. Thuc Uong |\n"); Console.WriteLine("\t\t\t | 4. Thoat |\n"); Console.WriteLine("\t\t\t |===================================CHOOSE====================================|\n"); Console.WriteLine("Ban Chon: "); chon = int.Parse(Console.ReadLine()); try { switch (chon) { case 0: QuanLiThucDon.MenuThuTuSapXep(); break; case 1: List <ThucDon> lTD = QuanLiThucDon.SapXepThucDon(flag); if (flag == 1) { Console.WriteLine("Danh Sach Mon Tang Dan Theo Gia: "); } else { Console.WriteLine("Danh Sach Mon Giam Dan Theo Gia: "); } Console.WriteLine("\t\t\t Ten Mon | Gia | Tinh Trang | Thoi Diem Ban | Loai"); Console.WriteLine("\t\t\t ------------------------------------------------------------------------------\n"); lTD.ForEach(x => x.HienThi()); break; case 2: List <ThucAn> lTA = QuanLiThucDon.SapXepThucAn(flag); if (flag == 1) { Console.WriteLine("Danh Sach Thuc An Tang Dan Theo Gia: "); } else { Console.WriteLine("Danh Sach Thuc An Giam Dan Theo Gia: "); } Console.WriteLine("\t\t\t Ten Mon | Gia | Tinh Trang | Thoi Diem Ban | Loai"); Console.WriteLine("\t\t\t ------------------------------------------------------------------------------\n"); lTA.ForEach(x => x.HienThi()); break; case 3: List <ThucUong> lTU = QuanLiThucDon.SapXepThucUong(flag); if (flag == 1) { Console.WriteLine("Danh Sach Thuc Uong Tang Dan Theo Gia: "); } else { Console.WriteLine("Danh Sach Thuc Uong Giam Dan Theo Gia: "); } Console.WriteLine("\t\t\t Ten Mon | Gia | Tinh Trang | Thoi Diem Ban | Loai"); Console.WriteLine("\t\t\t ------------------------------------------------------------------------------\n"); lTU.ForEach(x => x.HienThi()); break; case 4: Environment.Exit(0); break; default: Console.WriteLine("Vui Long Nhap Lai"); break; } } catch (System.FormatException) { Console.WriteLine("Vui Long Nhap Chu So"); } }while(chon != 0 || chon != 4); }