Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     thongTinHeThong = thongTinHeThongManagement.getThongTinHeThong()[0];
     listLoaiTienBox = loaiTienManagement.getLoaiTien(" where TrangThai=N'KichHoat' and ThuTuHienThiBox>0");
     if (Request.QueryString["IDNguoiDungGioiThieu"] != null && Session["TenDangNhap"] == null)
     {
         Request.Cookies.Remove("IDNguoiDungGioiThieu");
         HttpCookie httpCookie = new HttpCookie("IDNguoiDungGioiThieu", Request.QueryString["IDNguoiDungGioiThieu"].ToString());
         httpCookie.Expires = DateTime.Now.AddDays(10);
         Request.Cookies.Add(httpCookie);
     }
     //hòa sửa 24/02 thêm vào ktr hiển thị menu quản trị
     if (Session["TenDangNhap"] != null)
     {
         listNguoiDung = nguoiDungManagement.getNguoiDung("WHERE TenDangNhap=N'" + Session["TenDangNhap"] + "'");
         if (listNguoiDung.Count > 0)
         {
             loainguoidung = listNguoiDung[0].LoaiNguoiDung;
         }
         else
         {
             loainguoidung = "";
         }
     }
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     thongTinHeThong = thongTinHeThongManagement.getThongTinHeThong()[0];
     if (!this.IsPostBack)
     {
         initializeDataInControl();
     }
 }
Пример #3
0
 public ThongTinHeThong getThongTinHeThongById(int iD)
 {
     try
     {
         ThongTinHeThong ThongTinHeThong = (ThongTinHeThong)session.Get <ThongTinHeThong>(iD);
         return(ThongTinHeThong);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Пример #4
0
 public void xoaThongTinHeThong(ThongTinHeThong ThongTinHeThong)
 {
     sessionManager.BeginTransaction();
     try
     {
         session.Delete(ThongTinHeThong);
         sessionManager.CommitTransaction();
     }
     catch (HibernateException ex)
     {
         throw new DataException(ex.Message, ex);
     }
 }
Пример #5
0
 public void themThongTinHeThong(ThongTinHeThong ThongTinHeThong)
 {
     sessionManager.BeginTransaction();
     try
     {
         session.Save(ThongTinHeThong);
         sessionManager.CommitTransaction();
         //session.Close();
     }
     catch (HibernateException ex)
     {
         throw new DataException(ex.Message, ex);
     }
 }
Пример #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //if (Session["TenDangNhap"] == null)
     //{
     //    Response.Redirect("/");
     //}
     thongTinHeThong = thongTinHeThongManagement.getThongTinHeThong()[0];
     listLoaiTienBox = loaiTienManagement.getLoaiTien(" where TrangThai=N'KichHoat' and ThuTuHienThiBox>0");
     //hòa sửa 24/02 thêm vào ktr hiển thị menu quản trị
     if (Session["TenDangNhap"] != null)
     {
         listNguoiDung = nguoiDungManagement.getNguoiDung("WHERE TenDangNhap=N'" + Session["TenDangNhap"] + "'");
         if (listNguoiDung.Count > 0)
         {
             loainguoidung = listNguoiDung[0].LoaiNguoiDung;
         }
         else
         {
             loainguoidung = "";
         }
     }
 }