/// <summary> /// 查询分页列表 /// </summary> /// <returns></returns> public ActionResult GetList() { int pageIndex = WebUtil.GetFormValue <int>("PageIndex", 1); int pageSize = WebUtil.GetFormValue <int>("PageSize", 15); string TabName = WebUtil.GetFormValue <string>("TabName", string.Empty); string CompanyID = WebUtil.GetFormValue <string>("CompanyID", string.Empty); PageInfo pageInfo = new PageInfo() { PageIndex = pageIndex, PageSize = pageSize }; SequenceProvider provider = new SequenceProvider(CompanyID); SequenceEntity entity = new SequenceEntity(); entity.TabName = TabName; entity.CompanyID = CompanyID; List <SequenceEntity> listResult = provider.GetList(entity, ref pageInfo); DataListResult <SequenceEntity> result = new DataListResult <SequenceEntity>() { Code = (int)EResponseCode.Success, PageInfo = pageInfo, Result = listResult, Message = "响应成功" }; return(Content(JsonHelper.SerializeObject(result))); }
public ActionResult SN() { string TabName = WebUtil.GetFormValue <string>("TabName", string.Empty); int PageIndex = WebUtil.GetFormValue <int>("PageIndex", 1); int PageSize = WebUtil.GetFormValue <int>("PageSize", 10); SequenceProvider provider = new SequenceProvider(); SequenceEntity entity = new SequenceEntity(); if (!TabName.IsEmpty()) { entity.Where("TabName", ECondition.Like, "%" + TabName + "%"); } PageInfo pageInfo = new PageInfo() { PageIndex = PageIndex, PageSize = PageSize }; List <SequenceEntity> listResult = provider.GetList(entity, ref pageInfo); listResult = listResult.IsNull() ? new List <SequenceEntity>() : listResult; string json = JsonConvert.SerializeObject(listResult); this.ReturnJson.AddProperty("Data", json); this.ReturnJson.AddProperty("RowCount", pageInfo.RowCount); return(Content(this.ReturnJson.ToString())); }