//int totalCount2 = 0; protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { pager.PageSize = pageSize; pager2.PageSize = pageSize2; totalCount = billMaster.GetRowCount(filter); pager.RecordCount = totalCount; GridDataBind(); } else { pageCount = Convert.ToInt32(ViewState["pageCount"]); pageIndex = Convert.ToInt32(ViewState["pageIndex"]); totalCount = Convert.ToInt32(ViewState["totalCount"]); filter = ViewState["filter"].ToString(); OrderByFields = ViewState["OrderByFields"].ToString(); totalCount = billMaster.GetRowCount(filter); pageIndex2 = Convert.ToInt32(ViewState["pageIndex2"]); pager.RecordCount = totalCount; GridDataBind(); } } catch (Exception exp) { JScript.Instance.ShowMessage(this.UpdatePanel1, exp.Message); } }
//int totalCount2 = 0; protected void Page_Load(object sender, EventArgs e) { try { string userName = Session["G_user"].ToString(); if (Application["MNU_M00D_00G"] == null || Application["MNU_M00D_00G"].ToString() == userName || Application["MNU_M00D_00G"].ToString() == "") { if (!IsPostBack) { pager.PageSize = pageSize; pager2.PageSize = pageSize2; totalCount = billMaster.GetRowCount(filter); pager.RecordCount = totalCount; GridDataBind(); } else { pageCount = Convert.ToInt32(ViewState["pageCount"]); pageIndex = Convert.ToInt32(ViewState["pageIndex"]); totalCount = Convert.ToInt32(ViewState["totalCount"]); filter = ViewState["filter"].ToString(); OrderByFields = ViewState["OrderByFields"].ToString(); totalCount = billMaster.GetRowCount(filter); pageIndex2 = Convert.ToInt32(ViewState["pageIndex2"]); pager.RecordCount = totalCount; GridDataBind(); } Application["MNU_M00D_00G"] = Session["G_user"]; } else { //JScript.Instance.ShowMessage(this.UpdatePanel1, "该页面已为'" + Session["G_user"].ToString() + "'用户占用,请稍候..."); Exception exp = new Exception(); Session["ModuleName"] = "移位单"; Session["FunctionName"] = "Page_Load"; Session["ExceptionalType"] = exp.GetType().FullName; Session["ExceptionalDescription"] = "该页面已为" + Application["MNU_M00D_00G"].ToString() + "用户占用,请稍候..."; Response.Redirect("../../Common/MistakesPage.aspx"); } } catch (Exception exp) { JScript.Instance.ShowMessage(this.UpdatePanel1, exp.Message); } }
//int totalCount2 = 0; protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { BillType objType = new BillType(); DataSet dsTemp = objType.QueryBillType(1, 100, "BUSINESS='3'", "TYPECODE"); DataRow newRow = dsTemp.Tables[0].NewRow(); newRow["TYPECODE"] = "3"; newRow["TYPENAME"] = "所有移位单"; dsTemp.Tables[0].Rows.InsertAt(newRow, 0); this.ddlBillType.DataSource = dsTemp.Tables[0].DefaultView; this.ddlBillType.DataTextField = "TYPENAME"; this.ddlBillType.DataValueField = "TYPECODE"; this.ddlBillType.DataBind(); this.txtValidateDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd"); this.txtValidatePerson.Text = Session["EmployeeName"].ToString(); pager.PageSize = pageSize; pager2.PageSize = pageSize2; totalCount = billMaster.GetRowCount(filter); pager.RecordCount = totalCount; GridDataBind(); } else { pageCount = Convert.ToInt32(ViewState["pageCount"]); pageIndex = Convert.ToInt32(ViewState["pageIndex"]); totalCount = Convert.ToInt32(ViewState["totalCount"]); filter = ViewState["filter"].ToString(); OrderByFields = ViewState["OrderByFields"].ToString(); totalCount = billMaster.GetRowCount(filter); pageIndex2 = Convert.ToInt32(ViewState["pageIndex2"]); pager.RecordCount = totalCount; GridDataBind(); } } catch (Exception exp) { JScript.Instance.ShowMessage(this.UpdatePanel1, exp.Message); } }