public void LoadData() { string username = Request.Cookies["usernameLoginSystem"].Value; var acc = AccountController.GetByUsername(username); if (acc != null) { if (acc.RoleID == 0 || acc.Username == "nhom_zalo502") { ltrAddPost.Text = "<a href='/tao-thong-bao' class='h45-btn btn primary-btn'>Thêm mới</a>"; } } string TextSearch = ""; string CreatedDate = ""; string CreatedBy = ""; int CategoryID = 0; string AtHome = ""; string orderBy = ""; if (Request.QueryString["textsearch"] != null) { TextSearch = Request.QueryString["textsearch"].Trim(); } if (Request.QueryString["categoryid"] != null) { CategoryID = Request.QueryString["categoryid"].ToInt(); } if (Request.QueryString["createddate"] != null) { CreatedDate = Request.QueryString["createddate"]; } if (Request.QueryString["athome"] != null) { AtHome = Request.QueryString["athome"]; } if (Request.QueryString["createdby"] != null) { CreatedBy = Request.QueryString["createdby"]; } if (Request.QueryString["orderby"] != null) { orderBy = Request.QueryString["orderby"]; } txtSearchPost.Text = TextSearch; ddlCategory.SelectedValue = CategoryID.ToString(); ddlCreatedDate.SelectedValue = CreatedDate; ddlAtHome.SelectedValue = AtHome; ddlCreatedBy.SelectedValue = CreatedBy; ddlOrderBy.SelectedValue = orderBy; List <NotifyNewSQL> a = new List <NotifyNewSQL>(); a = NotifyController.GetAllSql(CategoryID, TextSearch, AtHome, CreatedDate, CreatedBy, orderBy); pagingall(a); ltrNumberOfPost.Text = a.Count().ToString(); }