Exemplo n.º 1
0
 public static NguoiNhanVe GetInfo(string MaNguoiNhan)
 {
     DataTable dt = ShipBookingData.FillDataTable("spNguoiNhan_SelectByID", "@MaNguoiNhan", MaNguoiNhan);
     NguoiNhanVe NguoiNhan = new NguoiNhanVe();
     if (dt.Rows.Count > 0)
     {
         NguoiNhan.MaNguoiNhan = dt.Rows[0]["MaNguoiNhan"].ToString();
         NguoiNhan.Ten = dt.Rows[0]["Ten"].ToString();
         NguoiNhan.DiaChi = dt.Rows[0]["DiaChi"].ToString();
         NguoiNhan.MaThanhPho = dt.Rows[0]["MaThanhPho"].ToString();
         NguoiNhan.DienThoai = dt.Rows[0]["DienThoai"].ToString();
         NguoiNhan.Email = dt.Rows[0]["Email"].ToString();
         NguoiNhan.YeuCauKhac = dt.Rows[0]["YeuCauKhac"].ToString();
         NguoiNhan.ThoiGianGiaoVe = dt.Rows[0]["ThoiGianGiaoVe"].ToString();
     }
     else
     {
         NguoiNhan = null;
     }
     return NguoiNhan;
 }
        protected void FillNguoiNhanVeData(string MaBF)
        {
            BookingFile booking = new BookingFile();
            booking = BookingFileDB.GetInfo(MaBF);

            if (booking != null)
            {
                string MaNN = "";
                MaNN = booking.MaNguoiNhan.Trim();

                NguoiNhanVe nguoinhan = new NguoiNhanVe();
                nguoinhan = NguoiNhanVeDB.GetInfo(MaNN);

                if (nguoinhan != null)
                {
                    lblMaNN.Text = nguoinhan.MaNguoiNhan.Trim();
                    lblTenNN.Text = nguoinhan.Ten.Trim();
                    lblDiaChiNN.Text = nguoinhan.DiaChi.Trim();
                    lblSoDienThoaiNN.Text = nguoinhan.DienThoai.Trim();
                    lblEmailNN.Text = nguoinhan.Email.Trim();
                    lblYeuCauKhac.Text = nguoinhan.YeuCauKhac.Trim();
                }
            }
        }
Exemplo n.º 3
0
 public static void Update(NguoiNhanVe NguoiNhan)
 {
     string[] parameters = new string[] { "@MaNguoiNhan", "@Ten", "@DiaChi", "@MaThanhPho", "@DienThoai", "@Email", "@YeuCauKhac", "@ThoiGianGiaoVe" };
     string[] values = new string[] { NguoiNhan.MaNguoiNhan, NguoiNhan.Ten, NguoiNhan.DiaChi, NguoiNhan.MaThanhPho, NguoiNhan.DienThoai, NguoiNhan.Email, NguoiNhan.YeuCauKhac, NguoiNhan.ThoiGianGiaoVe };
     ExecuteData("spNguoiNhan_UpdateByID", parameters, values);
 }