public ActionResult Index(PageInfo pageInfo, GoodsTypeListModel model) { IPagedList <GoodsType> GoodsTypeList = _goodsTypeService.GetList(model.Name, pageInfo.PageIndex, pageInfo.PageSize, pageInfo.sortExpression); model.GoodsType = GoodsTypeList.MapTo <IList <GoodsType>, IList <GoodsTypeModel> >(); var results = new DataTable <GoodsTypeModel>() { Draw = pageInfo.Draw + 1, RecordsTotal = GoodsTypeList.TotalCount, RecordsFiltered = GoodsTypeList.TotalCount, Data = model.GoodsType }; return(Json(new PlainJsonResponse(results))); }
public ActionResult Index(PageInfo pageInfo, ClientDataListModel model) { IPagedList <ClientData> UserList = _clientDataService.GetList(model.Name, pageInfo.PageIndex, pageInfo.PageSize, pageInfo.sortExpression); model.ClientData = UserList.MapTo <IList <ClientData>, IList <ClientDataModel> >(); var results = new DataTable <ClientDataModel>() { Draw = pageInfo.Draw + 1, RecordsTotal = UserList.TotalCount, RecordsFiltered = UserList.TotalCount, Data = model.ClientData }; return(Json(new PlainJsonResponse(results))); }
public ActionResult Index(PageInfo pageInfo, TransferCargoDataListModel model) { IPagedList <TransferCargoData> TransferCargoDataList = _transferCargoDataService.GetList(model.Name, pageInfo.PageIndex, pageInfo.PageSize, pageInfo.sortExpression); model.TransferCargoDataList = TransferCargoDataList.MapTo <IList <TransferCargoData>, IList <TransferCargoDataModel> >(); var results = new DataTable <TransferCargoDataModel>() { Draw = pageInfo.Draw + 1, RecordsTotal = TransferCargoDataList.TotalCount, RecordsFiltered = TransferCargoDataList.TotalCount, Data = model.TransferCargoDataList }; return(Json(new PlainJsonResponse(results))); }
public ActionResult Index(PageInfo pageInfo, SalesShipmentsDataListModel model) { IPagedList <SalesShipmentsData> SalesShipmentsDataList = _salesShipmentsDataService.GetList(model.Name, model.ShowInactive, pageInfo.PageIndex, pageInfo.PageSize, pageInfo.sortExpression); model.SalesShipmentsData = SalesShipmentsDataList.MapTo <IList <SalesShipmentsData>, IList <SalesShipmentsDataModel> >(); var results = new DataTable <SalesShipmentsDataModel>() { Draw = pageInfo.Draw + 1, RecordsTotal = SalesShipmentsDataList.TotalCount, RecordsFiltered = SalesShipmentsDataList.TotalCount, Data = model.SalesShipmentsData }; return(Json(new PlainJsonResponse(results))); }
public ActionResult Index(PageInfo pageInfo, SalesShipmentsStatisticsListModel model) { IPagedList <SalesShipmentsStatisticsModelShow> salesShipmentsStatistics = _salesShipmentsStatisticsService.GetList( model.GoodsID, model.ClientDataID, model.FromDate, model.ToDate, pageInfo.PageIndex, pageInfo.PageSize, pageInfo.sortExpression); model.SalesShipmentsStatistics = salesShipmentsStatistics.MapTo <IList <SalesShipmentsStatisticsModelShow>, IList <SalesShipmentsStatisticsModel> >(); var results = new DataTable <SalesShipmentsStatisticsModel>() { Draw = pageInfo.Draw + 1, RecordsTotal = salesShipmentsStatistics.TotalCount, RecordsFiltered = salesShipmentsStatistics.TotalCount, Data = model.SalesShipmentsStatistics }; return(Json(new PlainJsonResponse(results))); }
public static IEnumerable <CategoryGridModel> ToGridModel(this IPagedList <EntityLibrary.Model.Product> entity) { return(entity.MapTo <IEnumerable <EntityLibrary.Model.Product>, IEnumerable <CategoryGridModel> >()); }