private void LoadExportBL() { if (!ReferenceEquals(Session[Constants.SESSION_USER_INFO], null)) { IUser user = (IUser)Session[Constants.SESSION_USER_INFO]; if (!ReferenceEquals(Session[Constants.SESSION_SEARCH_CRITERIA], null)) { SearchCriteria searchCriteria = (SearchCriteria)Session[Constants.SESSION_SEARCH_CRITERIA]; if (!ReferenceEquals(searchCriteria, null)) { BuildSearchCriteria(searchCriteria); gvExportBL.PageIndex = searchCriteria.PageIndex; if (searchCriteria.PageSize > 0) { gvExportBL.PageSize = searchCriteria.PageSize; } gvExportBL.DataSource = JobBLBLL.GetExportBLForListing(searchCriteria); gvExportBL.DataBind(); } } } }
protected void gvExportBL_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("Sort")) { if (ViewState[Constants.SORT_EXPRESSION] == null) { ViewState[Constants.SORT_EXPRESSION] = e.CommandArgument.ToString(); ViewState[Constants.SORT_DIRECTION] = "ASC"; } else { if (ViewState[Constants.SORT_EXPRESSION].ToString() == e.CommandArgument.ToString()) { if (ViewState[Constants.SORT_DIRECTION].ToString() == "ASC") { ViewState[Constants.SORT_DIRECTION] = "DESC"; } else { ViewState[Constants.SORT_DIRECTION] = "ASC"; } } else { ViewState[Constants.SORT_DIRECTION] = "ASC"; ViewState[Constants.SORT_EXPRESSION] = e.CommandArgument.ToString(); } } LoadExportBL(); } else if (e.CommandName == "Edit") { RedirecToAddEditPage(Convert.ToString(e.CommandArgument)); } else if (e.CommandName == "Dashboard") { string encryptedId = GeneralFunctions.EncryptQueryString(Convert.ToString(e.CommandArgument)); Response.Redirect("~/Forwarding/Transaction/Dashboard.aspx?BLNumber=" + encryptedId); } else if (e.CommandName == "RemoveData") { bool IsActive = false; //if (((System.Web.UI.WebControls.LinkButton)(e.CommandSource)).Text == "Active") // IsActive = false; //else // IsActive = true; //Active/InActive JobBLBLL.ChangeBLStatus(Convert.ToString(e.CommandArgument), IsActive); LoadExportBL(); } }