protected void GetHanhKhachData()
        {
            HanhKhach khach = new HanhKhach();
            string maHK = "";
            Random rdm = new Random();
            maHK = "HK" + rdm.Next(10000, 99999).ToString().Trim();

            khach.MaHK = maHK.Trim();
            khach.Ten = txtHoTen.Text;
            khach.DiaChi = txtDiaChi.Text;
            khach.QuocTich = ddlQuocTich.SelectedItem.Text;
            khach.DoTuoi = ddlDoTuoi.SelectedItem.Text;
            khach.DienThoai = txtSoDienThoai.Text;
            khach.Email = txtEmail.Text;
            khach.MaBF = "";

            DatVeControl.listKhach.Add(khach);
            khach = null;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            loaichuyen = Request.QueryString["LoaiChuyen"];
            noidi = Request.QueryString["NoiDi"];
            noiden = Request.QueryString["NoiDen"];
            ngaydi = Request.QueryString["NgayDi"];
            ngayve = Request.QueryString["NgayVe"];
            machang = Request.QueryString["MaChang"];
            MaHanhTrinh = Request.QueryString["MaHanhTrinh"];
            LoaiVe = Request.QueryString["LoaiVe"];
            SoVe = Request.QueryString["SoVe"];
            GiaTien = Request.QueryString["GiaTien"];
            HanhKhach khach = null;
            for (int i = 0; i < Convert.ToInt16(SoVe); i++)
            {
                khach = new HanhKhach();

                khach.MaHK = Request.QueryString["MaKhach" + i.ToString()];
                khach.Ten = Request.QueryString["TenKhach" + i.ToString()];
                khach.DoTuoi = Request.QueryString["DoTuoiKhach" + i.ToString()];
                khach.SoGhe = Request.QueryString["SoGheKhach" + i.ToString()];
                khach.GiaTien = Request.QueryString["GiaTienKhach" + i.ToString()];

                listKhach.Add(khach);
            }

            hanhtrinh = HanhTrinhDB.GetInfo(MaHanhTrinh);
            if (!IsPostBack)
            {
                InitControl();
                ListControlUtilities.FillDataToDropDownList(ddlThanhPho, "tblThanhPho", "Ten", "MaThanhPho");
                FillDataToDdlThoiGian();
                FillDataToRdbHinhThucThanhToan();
                FillBookingData();
                SetHanhKhachData();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            loaichuyen = Request.QueryString["LoaiChuyen"];
            noidi = Request.QueryString["NoiDi"];
            noiden = Request.QueryString["NoiDen"];
            ngaydi = Request.QueryString["NgayDi"];
            ngayve = Request.QueryString["NgayVe"];
            machang = Request.QueryString["MaChang"];
            MaHanhTrinh = Request.QueryString["MaHanhTrinh"];
            LoaiVe = Request.QueryString["LoaiVe"];
            SoVe = Request.QueryString["SoVe"];
            GiaTien = Request.QueryString["GiaTien"];
            DiaChi = Request.QueryString["DiaChi"];
            DienThoai = Request.QueryString["DienThoai"];
            Email = Request.QueryString["Email"];
            MaNguoiNhan = Request.QueryString["MaNguoiNhan"];
            MaThanhPho = Request.QueryString["MaThanhPho"];
            Ten = Request.QueryString["Ten"];
            ThanhToan = Request.QueryString["ThanhToan"];
            ThoiGianGiaoVe = Request.QueryString["ThoiGianGiaoVe"];
            YeuCauKhac = Request.QueryString["YeuCauKhac"];

            HanhKhach khach = null;
            for (int i = 0; i < Convert.ToInt16(SoVe); i++)
            {
                khach = new HanhKhach();

                khach.MaHK = Request.QueryString["MaKhach" + i.ToString()];
                khach.Ten = Request.QueryString["TenKhach" + i.ToString()];
                khach.DoTuoi = Request.QueryString["DoTuoiKhach" + i.ToString()];
                khach.SoGhe = Request.QueryString["SoGheKhach" + i.ToString()];
                khach.GiaTien = Request.QueryString["GiaTienKhach" + i.ToString()];
                khach.DiaChi = "";
                khach.Email = "";
                khach.MaBF = "";
                khach.QuocTich = "";

                listKhach.Add(khach);
            }

            hanhtrinh = HanhTrinhDB.GetInfo(MaHanhTrinh);
            lblMsg.Text = "";
            bSelectAgainSoGhe = false;
            if (!IsPostBack)
            {
                FillBookingData();
                SetHanhKhachData();
                SetNguoiNhanVeData();
            }
        }
        protected void GetHanhKhachData()
        {
            int slKhach = 0;
            string strTextBoxID = "";
            string strDdlID = "";
            TextBox[] textBox = new TextBox[100];
            DropDownList[] ddl = new DropDownList[100];
            HanhKhach khach;

            slKhach = Convert.ToInt16(SoVe);
            listKhach = new List<HanhKhach>();
            for (int i = 1; i <= slKhach; i++)
            {
                strTextBoxID = "txtHoTen" + i.ToString();
                strDdlID = "ddlDoTuoi" + i.ToString();
                textBox[i] = (TextBox)this.FindControl(strTextBoxID);
                ddl[i] = (DropDownList)this.FindControl(strDdlID);
                if (textBox[i] != null && ddl[i] != null)
                {
                    khach = new HanhKhach();
                    khach.MaHK = TaoMaHK(textBox[i].Text.Trim());
                    khach.Ten = textBox[i].Text.Trim();
                    khach.DiaChi = "";
                    khach.QuocTich = "";
                    khach.DoTuoi = ddl[i].SelectedItem.Text.Trim();
                    khach.SoGhe = ListSoGhe[i - 1].Trim(); //Trường số điện thoại giờ dùng để lưu trữ số ghế của khách
                    khach.Email = "";
                    khach.MaBF = "";
                    khach.GiaTien = TinhGiaVe(ddl[i].SelectedValue.Trim());

                    listKhach.Add(khach);
                    khach = null;
                }
            }
        }