コード例 #1
0
ファイル: Site.master.cs プロジェクト: atum201/CKTD
 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
ファイル: QuanTri.master.cs プロジェクト: atum201/CKTD
 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 = "";
         }
     }
 }