Example #1
0
 public static void TongDoanhThu()
 {
     Console.WriteLine($"\t\t\t Doanh Thu Ca Nam: ");
     QuanLiHoaDon.DanhSachHoaDon(QuanLiHoaDon.lHoaDon);
     Console.WriteLine("\t\t\t ---------------------------------------------------");
     Console.WriteLine($"\t\t\t Tong:                                 | {QuanLiHoaDon.TinhTien(QuanLiHoaDon.lHoaDon), -12}");
     Console.WriteLine("\t\t\t ---------------------------------------------------");
 }
Example #2
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);
        }
Example #3
0
        public static void MenuDoanhThu()
        {
            int chon;

            do
            {
                Console.WriteLine("\t\t\t |==============================Quan Li Doanh Thu==============================|\n");
                Console.WriteLine("\t\t\t |                            0. Quay Lai                                      |\n");
                Console.WriteLine("\t\t\t |                            1. Theo Thang                                    |\n");
                Console.WriteLine("\t\t\t |                            2. Tong Doanh Thu                                |\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:
                        QuanLiHoaDon.MenuQuanLiHoaDon();
                        break;

                    case 1:
                        string Thang;
                        Console.WriteLine("Thang Muon Tinh Doanh Thu: ");
                        Thang = Console.ReadLine();
                        QuanLiHoaDon.DoanhThuTheoThang(Thang);
                        break;

                    case 2:
                        QuanLiHoaDon.TongDoanhThu();
                        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);
        }
Example #4
0
        public static void DoanhThuTheoThang(string Thang)
        {
            List <HoaDon> lHD = QuanLiHoaDon.lHoaDon.FindAll(x => x.ThoiGian.Month.ToString() == Thang);

            if (lHD.Count != 0)
            {
                Console.WriteLine($"\t\t\t Doanh Thu Thang {Thang}: ");
                QuanLiHoaDon.DanhSachHoaDon(lHD);
                Console.WriteLine("\t\t\t ---------------------------------------------------");
                Console.WriteLine($"\t\t\t Tong:                                 | {QuanLiHoaDon.TinhTien(lHD), -12}");
                Console.WriteLine("\t\t\t ---------------------------------------------------");
            }
            else
            {
                Console.WriteLine($"Thang {Thang} Khong Co Doanh Thu");
            }
        }
Example #5
0
        public static void MenuQuanLiHoaDon()
        {
            int chon;

            do
            {
                Console.WriteLine("\t\t\t |===============================Quan Li Hoa Don===============================|\n");
                Console.WriteLine("\t\t\t |                            0. Quay Lai                                      |\n");
                Console.WriteLine("\t\t\t |                            1. Danh Sach Hoa Don                             |\n");
                Console.WriteLine("\t\t\t |                            2. Doanh Thu                                     |\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:
                        QuanLiQuan.MenuQuanLiQuanCaPhe();
                        break;

                    case 1:
                        QuanLiHoaDon.DanhSachHoaDon(QuanLiHoaDon.lHoaDon);
                        break;

                    case 2:
                        QuanLiHoaDon.MenuDoanhThu();
                        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);
        }