private string getOneGridInfo() { string strJson = ""; string strSortname = Request.Params["sortname"]; string strSortorder = Request.Params["sortorder"]; //当前页面 int intPageIndex = Convert.ToInt32(Request.Params["page"]); //每页记录数 int intPageSize = Convert.ToInt32(Request.Params["pagesize"]); TOaPartstandInfoVo PartstandInfoVo = new TOaPartstandInfoVo(); PartstandInfoVo.SORT_FIELD = strSortname; PartstandInfoVo.SORT_TYPE = strSortorder; if (Request["SAMPLE_CODE"] != null) { PartstandInfoVo.SAMPLE_CODE = Request["SAMPLE_CODE"].ToString(); } if (Request["SAMPLE_NAME"] != null) { PartstandInfoVo.SAMPLE_NAME = Request["SAMPLE_NAME"].ToString(); } if (Request["SAMPLE_TYPE"] != null) { PartstandInfoVo.SAMPLE_TYPE = Request["SAMPLE_TYPE"].ToString(); } if (Request["CLASS_TYPE"] != null) { PartstandInfoVo.CLASS_TYPE = Request["CLASS_TYPE"].ToString(); } DataTable dt = new DataTable(); int intTotalCount = 0; dt = new TOaPartstandInfoLogic().SelectByTableNew(PartstandInfoVo, intPageIndex, intPageSize, false); intTotalCount = new TOaPartstandInfoLogic().GetSelectResultCount(PartstandInfoVo); strJson = CreateToJson(dt, intTotalCount); return(strJson); }
/// <summary> /// 增加数据 /// </summary> /// <returns></returns> public string frmAdd() { TOaPartstandInfoVo PartstandInfoVo = autoBindRequest(Request, new TOaPartstandInfoVo()); PartstandInfoVo.ID = GetSerialNumber("t_oa_partstand_info_id"); PartstandInfoVo.TOTAL_INVENTORY = PartstandInfoVo.INVENTORY; string strMsg = ""; bool isSuccess = false; isSuccess = new TOaPartstandInfoLogic().Create(PartstandInfoVo); if (isSuccess) { strMsg = "数据保存成功"; } else { strMsg = "数据保存失败"; } return(isSuccess == true ? "{\"result\":\"success\",\"msg\":\"" + strMsg + "\"}" : "{\"result\":\"fail\",\"msg\":\"" + strMsg + "\"}"); }
private string getTwoGridInfo() { string strJson = ""; string strSortname = Request.Params["sortname"]; string strSortorder = Request.Params["sortorder"]; //当前页面 int intPageIndex = Convert.ToInt32(Request.Params["page"]); //每页记录数 int intPageSize = Convert.ToInt32(Request.Params["pagesize"]); TOaPartstandInfoVo PartstandInfoVo = new TOaPartstandInfoVo(); PartstandInfoVo.SORT_FIELD = strSortname; PartstandInfoVo.SORT_TYPE = strSortorder; DataTable dt = new DataTable(); int intTotalCount = 0; dt = new TOaPartstandInfoLogic().SelectByTableNew(PartstandInfoVo, intPageIndex, intPageSize, true); intTotalCount = new TOaPartstandInfoLogic().GetSelectResultCount(PartstandInfoVo); strJson = CreateToJson(dt, intTotalCount); return(strJson); }