コード例 #1
0
        private void LoadList()
        {
            try
            {
                var list = _CompanyRepo.GetListByContainsAll(txtKeyword.Value);

                HttpContext.Current.Session["listCompany"] = list;
                ASPxGridView1_Congty.DataSource            = list;
                ASPxGridView1_Congty.DataBind();
            }
            catch //(Exception)
            {
                //throw;
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            bool isPermission = _UnitDataRepo.checkPermissionPage("danh-sach-cong-ty.aspx", Utils.CIntDef(Session["groupId"]), Utils.CIntDef(Session["groupType"]));

            if (!isPermission)
            {
                Response.Write("<script>alert('Bạn không có quyền truy cập vào trang này');location.href='trang-chu.aspx';</script>");
            }
            if (!IsPostBack)
            {
                LoadList();
            }
            else
            {
                ASPxGridView1_Congty.DataSource = HttpContext.Current.Session["listCompany"];
                ASPxGridView1_Congty.DataBind();
            }
        }