Пример #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 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("");
 }
Пример #3
0
        public static void chonngaychieu(ref Thoigian thoigian)
        {
            Danhsachphim dsp = new Danhsachphim();

            dsp.layDSngay_xuatchieu();
            Console.WriteLine("Moi ban chon ngay chieu ");
            Console.WriteLine("( Yeu cau: Nhap dung thong tin )");
            DateTime ngay = Convert.ToDateTime(Console.ReadLine());

            Console.WriteLine("Moi ban chon  suat chieu");
            Console.WriteLine("( Yeu cau: Nhap dung thong tin )");
            string suat = Console.ReadLine();

            thoigian.Suat = suat;
            thoigian.Ngay = ngay;
        }
Пример #4
0
 public Phim(string tenphim, string tenrap, Thoigian date)
 {
     Tenphim = tenphim;
     Tenrap  = tenrap;
     date    = date;
 }
Пример #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();
        }