예제 #1
0
 public static void Hienthi2(ref Phim phim, ref Thoigian thoigian, ref int sovethuong, ref int sovevip)
 {
     chonphim(ref phim);
     chonrap(ref phim);
     chonngaychieu(ref thoigian);
     phim.Date = thoigian;
     chonve(ref sovethuong, ref sovevip);
 }
예제 #2
0
        public static void chonphim(ref Phim phim)
        {
            Danhsachphim dsp = new Danhsachphim();

            dsp.layDSphim();
            Console.WriteLine("");
            Console.WriteLine();
            Console.WriteLine("Moi ban chon phim ");
            string stt = Console.ReadLine();

            phim.Tenphim = stt;
            Console.WriteLine();
        }
예제 #3
0
 public static void Hienthi3(ref Phim phim, ref Thoigian thoigian, ref int sovethuong, ref int sovevip)
 {
     Console.WriteLine(" Thong Tin Dat Ve Cua Quy Khach :");
     Console.WriteLine();
     Console.WriteLine("");
     Console.WriteLine("Ten Phim : {0}", phim.Tenphim);
     Console.WriteLine("Rap Phim : {0}", phim.Tenrap);
     Console.WriteLine("Dia Chi Rap phim : {0}", phim.Diachirap);
     Console.WriteLine("Ngay Chieu : {0}", phim.Date.Ngay, phim.Date.Suat);
     Console.WriteLine("Suat Chieu : {0}", phim.Date.Suat);
     Console.WriteLine("Ma ve tuong ung: " + invedaban(sovethuong, sovevip));
     Console.WriteLine(tinhtongtien(sovethuong, sovevip));
     Console.WriteLine("");
 }
예제 #4
0
        public static void chonrap(ref Phim phim)
        {
            Danhsachphim dsp = new Danhsachphim();

            dsp.layDSrap();
            Console.WriteLine();
            Console.WriteLine("");
            Console.WriteLine("Moi ban chon rap");
            Console.WriteLine("( Yeu cau: Nhap dung rap )");
            string stt = Console.ReadLine();

            phim.Tenrap = stt;
            Console.WriteLine("Moi ban nhap dia chi rap");
            Console.WriteLine("( Yeu cau: Nhap dung dia chi rap )");
            phim.Diachirap = Console.ReadLine();
        }
예제 #5
0
        static void Main(string[] args)
        {
            int      luachon = 0;
            int      sovethuong = 0, sovevip = 0;
            int      xlmenu = 0;
            string   back;
            Thoigian thoigian = new Thoigian();
            Phim     phim     = new Phim();

            Menu(ref xlmenu);
            switch (xlmenu)
            {
            case 1:
                Hienthi1();
                break;

            case 2:
                Hienthi2(ref phim, ref thoigian, ref sovethuong, ref sovevip);
                Hienthi3(ref phim, ref thoigian, ref sovethuong, ref sovevip);
                break;

            case 3:
                Console.WriteLine("Chuc nang danh cho nguoi quan ly");
                Console.WriteLine("1 - Chuc nang lay so luong ve con lai va da ban");
                Console.WriteLine("2 - Chuc nang hien thi phim dang chieu");
                Console.WriteLine("3 - Chuc nang hien thi phim sap chieu");
                Console.WriteLine("4 - Chuc nang hien thi rap tham gia he thong");
                Console.WriteLine(" Moi ban chon");

                int chucnang = int.Parse(Console.ReadLine());
                while ((chucnang > 4) || (chucnang < 1))
                {
                    Console.WriteLine("Ban chon so nam ngoai pham vi cac so tren menu.");
                    Console.Write("Moi ban chon lai :");
                    chucnang = int.Parse(Console.ReadLine());
                }
                switch (chucnang)
                {
                case 1:
                    Hienthiveconlai(ref sovethuong, ref sovevip);
                    break;

                case 2:
                    Hienthiphimdangchieu();
                    break;

                case 3:
                    Hienthiphimsapchieu();
                    break;

                case 4:
                    Hienthidanhsachrap();
                    break;
                }
                break;

            case 4:
                Environment.Exit(0);
                break;
            }

            Console.ReadLine();
        }