Esempio n. 1
0
    protected void LoadDatTour(DatPhong data)
    {
        //Thong tin Tour
        //lbidtour.Text = data.IDPhong.ToString();
        lbtentour.Text = data.Name_Vn;
        lbgiatour.Text = data.Price + "VNĐ";
        //Thong tin khach hang
        lbID.Text = data.ID.ToString();
        lbdiachi.Text = data.DiaChi;
        lbhoten.Text = data.HoTen;
        lbemail.Text = data.Email;
        lbnoidung.Text = data.YeuCauKhac;
        lbnguoilon.Text = data.NguoiLon;
        lbtreem.Text = data.TreEm;
        lbsdt.Text = data.SDT.ToString();
        //lbngaygui.Text = data.NgayGui.ToShortDateString();

        lbNgayDen.Text = String.Format("{0:dd/MM/yyyy}", data.NgayDen);
        lbNgayDi.Text = String.Format("{0:dd/MM/yyyy}", data.NgayDi);
        lbtrangthai.Text = LoaiStatus(data.TrangThai);
        titletrangthai.Text = data.TrangThai.ToString();
    }
Esempio n. 2
0
 public static int Them(DatPhong dattour)
 {
     try
     {
         object rs = DataProvider.Instance.ExecuteNonQueryWithOutput("@ID", "DatPhong_Them",
             dattour.ID, dattour.HoTen, dattour.Email, dattour.DiaChi, dattour.SDT,
             dattour.NguoiLon, dattour.TreEm, dattour.YeuCauKhac, dattour.NgayGui,
             dattour.TrangThai, dattour.IDPhong, dattour.NgayDen, dattour.NgayDi);
         return Convert.ToInt32(rs);
     }
     catch
     {
         return 0;
     }
 }
Esempio n. 3
0
 public static bool Sua(DatPhong dattour)
 {
     try
     {
         object rs = DataProvider.Instance.ExecuteNonQuery("DatPhong_Sua",
             dattour.ID, dattour.HoTen, dattour.Email, dattour.DiaChi, dattour.SDT,
             dattour.NguoiLon, dattour.TreEm, dattour.YeuCauKhac, dattour.NgayGui,
             dattour.TrangThai, dattour.IDPhong);
         return Convert.ToInt32(rs) > 0;
     }
     catch
     {
         return false;
     }
 }