示例#1
0
        //chọn các dòng trong bảng
        private void dgrvLichChieu_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string tenphong = dgrvLichChieu.CurrentRow.Cells["PhongChieu"].Value.ToString();
            string tenphim  = dgrvLichChieu.CurrentRow.Cells["TenPhim"].Value.ToString();

            thoigianbatdau  = (TimeSpan)dgrvLichChieu.CurrentRow.Cells["tgBatDau"].Value;
            thoigianketthuc = (TimeSpan)dgrvLichChieu.CurrentRow.Cells["tgKetThuc"].Value;
            phongchieuid    = Convert.ToInt32(dgrvLichChieu.CurrentRow.Cells["PhongChieuID"].Value.ToString());
            phimid          = Convert.ToInt32(Convert.ToInt32(dgrvLichChieu.CurrentRow.Cells["PhimID"].Value.ToString()));
            tongsoghe       = Convert.ToInt32(dgrvLichChieu.CurrentRow.Cells["TongSoVe"].Value.ToString());
            int ID = Convert.ToInt32(dgrvLichChieu.CurrentRow.Cells["ID"].Value.ToString());

            gia = Convert.ToDecimal(dgrvLichChieu.CurrentRow.Cells["GiaVe"].Value.ToString());

            //nếu trùng checkID có nghĩa là đang vẽ rồi, không vẽ lại nữa
            if (checkID == ID)
            {
                return;
            }

            // lấy ra danh sách ghế đã đặt của dòng được click
            List <string> li = new DatVeDAO().LaySoGheDaDat(dtpNgayChieu.Value.Date, phongchieuid, thoigianbatdau, thoigianketthuc, phimid);

            // đổi tên group box
            grbGhe.Text = tenphong + " - " + tenphim;

            //vẽ các ghế trong phòng
            CreateListBtn(ucClick, tongsoghe, li);

            //gán lại checkID để kiểm tra trùng vào lần sau
            checkID = ID;
        }
示例#2
0
 public static DataTable DatVe_GetMALC(string maphim, string ngaychieu, string macc)
 {
     return(DatVeDAO.DatVe_GetMALC(maphim, ngaychieu, macc));
 }
示例#3
0
 public static DataTable DatVe_LoadDSChoNgoi(string maphim, string ngaychieu, string macc)
 {
     return(DatVeDAO.DatVe_LoadDSChoNgoi(maphim, ngaychieu, macc));
 }