Exemplo n.º 1
0
        public void thongKe(ref QuanLyVeXe ve)
        {
            bool back;

            do
            {
                int b = Menuthongke();
                back = false;
                switch (b)
                {
                case 1: ve.doanhthubienso(); Console.ReadKey(); break;

                case 2: ve.DoanhThuNgay(); Console.ReadKey(); break;

                case 3: ve.doanhthuthang(); Console.ReadKey(); break;

                case 4: ve.doanhthunam(); Console.ReadKey(); break;

                case 5: back = true; break;

                case 6: Environment.Exit(0); Console.ReadKey(); break;
                }
                Console.Clear();
            } while (back == false);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Program    p  = new Program();
            QuanLyXe   ql = new QuanLyXe(); ql.readFile("Xe.txt");
            QuanLyVeXe ve = new QuanLyVeXe(); ve.readFile("VeXe.txt");

            Console.OutputEncoding = Encoding.UTF8;
            Console.InputEncoding  = Encoding.UTF8;
            do
            {
                Console.Clear();
                switch (Menu())
                {
                case 1:
                    Console.Clear();
                    p.xulyxe(ref ql);
                    break;

                case 2:
                    Console.Clear();
                    p.xulyvexe(ref ve);
                    break;

                case 3:
                    Console.Clear();
                    p.xulytimkiem(ref ql);
                    break;

                case 4:
                    Console.Clear();
                    p.thongKe(ref ve);
                    break;

                case 0: Environment.Exit(0); Console.ReadKey(); break;
                }
                Console.Clear();
            } while (true);
        }
Exemplo n.º 3
0
        public void xulyvexe(ref QuanLyVeXe ve)
        {
            bool back;

            do
            {
                int b = MenuVeXe();
                back = false;
                switch (b)
                {
                case 1: ve.nhap(); Console.ReadKey(); break;

                case 2: ve.hien(); Console.ReadKey(); break;

                case 3: ve.UpDaTeVeXe(); Console.ReadKey(); break;

                case 4: ve.Xoa(); Console.ReadKey(); break;

                case 5:
                    Console.Write("Nhập biển số xe cần tìm kiếm:");
                    string bsxV = Console.ReadLine();
                    VeXe   vexe = ve.TimKiemTheoBienSoXe(bsxV);
                    if (ve == null)
                    {
                        Console.WriteLine("KHÔNG TÌM THẤY!");
                    }
                    ve.hienBsx(vexe);
                    Console.ReadKey(); break;

                case 6: back = true; break;

                case 7: Environment.Exit(0); Console.ReadKey(); break;
                }
                Console.Clear();
            } while (back == false);
        }