protected void Page_Load(object sender, EventArgs e) { user = (UserModel)Session["User"]; if (Session["User"] == null || Session["User"].ToString() == "" || user.UserType != 1) { Response.Redirect("../Login.aspx"); } else { if (!IsPostBack) { ChargeFeeTypeGridView.DataSource = bll.GetChargeFreeType(); ChargeFeeTypeGridView.DataBind(); } } }
protected void ChargeFreeGridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { ChargeFeeTypeGridView.PageIndex = e.NewPageIndex; ChargeFeeTypeGridView.DataSource = bll.GetChargeFreeType(); ChargeFeeTypeGridView.DataBind(); }