public ActionResult Index(PageInfo pageInfo, SupplierTypeListModel model) { IPagedList <SupplierType> supplierTypeList = _supplierTypeService.GetList(model.Name, pageInfo.PageIndex, pageInfo.PageSize, pageInfo.sortExpression); model.SupplierType = supplierTypeList.MapTo <IList <SupplierType>, IList <SupplierTypeModel> >(); var results = new DataTable <SupplierTypeModel>() { Draw = pageInfo.Draw + 1, RecordsTotal = supplierTypeList.TotalCount, RecordsFiltered = supplierTypeList.TotalCount, Data = model.SupplierType }; return(Json(new PlainJsonResponse(results))); }
public ActionResult Index() { SupplierTypeListModel model = new SupplierTypeListModel(); return(View(model)); }