Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }