/// <summary> /// 加载用户信息 /// </summary> public void InitUserData() { TWfSettingFlowVo setting = new TWfSettingFlowVo() { WF_STATE = "1" }; TWfSettingFlowLogic logic = new TWfSettingFlowLogic(setting); pager.RecordCount = logic.GetSelectResultCount(setting); DataTable dt = logic.SelectByTable(setting, pager.CurrentPageIndex, pager.PageSize); grdList.DataSource = dt.DefaultView; grdList.DataBind(); }
//获取信息 private void getData() { string strSortname = Request.Params["sortname"]; string strSortorder = Request.Params["sortorder"]; //当前页面 int intPageIndex = Convert.ToInt32(Request.Params["page"]); //每页记录数 int intPageSize = Convert.ToInt32(Request.Params["pagesize"]); TWfSettingFlowLogic logic = new TWfSettingFlowLogic(); TWfSettingFlowVo setting = new TWfSettingFlowVo(); setting.WF_STATE = "1"; setting.SORT_FIELD = strSortname; setting.SORT_TYPE = strSortorder; DataTable dt = logic.SelectByTable(setting, intPageIndex, intPageSize); int intTotalCount = logic.GetSelectResultCount(setting); string strJson = CreateToJson(dt, intTotalCount); Response.Write(strJson); Response.End(); }