public ActionResult Index(PageInfo pageInfo, ClientTypeListModel model) { IPagedList <ClientType> clientTypeList = _clientTypeService.GetList(model.Name, pageInfo.PageIndex, pageInfo.PageSize, pageInfo.sortExpression); model.ClientType = clientTypeList.MapTo <IList <ClientType>, IList <ClientTypeModel> >(); var results = new DataTable <ClientTypeModel>() { Draw = pageInfo.Draw + 1, RecordsTotal = clientTypeList.TotalCount, RecordsFiltered = clientTypeList.TotalCount, Data = model.ClientType }; return(Json(new PlainJsonResponse(results))); }
public ActionResult Index() { ClientTypeListModel model = new ClientTypeListModel(); return(View(model)); }