Exemplo n.º 1
0
        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)));
        }
Exemplo n.º 2
0
        public ActionResult Index()
        {
            ClientDataListModel model = new ClientDataListModel();

            return(View(model));
        }