Ejemplo n.º 1
0
        public async Task <IActionResult> ListDocuments(DataSourceRequest command, DocumentListModel model)
        {
            var documents = await _documentViewModelService.PrepareDocumentListModel(model, command.Page, command.PageSize);

            var gridModel = new DataSourceResult {
                Data  = documents.documetListModel,
                Total = documents.totalCount
            };

            return(Json(gridModel));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> ListDocuments(DataSourceRequest command, DocumentListModel model)
        {
            if (!string.IsNullOrEmpty(model.CustomerId))
            {
                model.SearchEmail = (await _customerService.GetCustomerById(model.CustomerId))?.Email;
            }

            var documents = await _documentViewModelService.PrepareDocumentListModel(model, command.Page, command.PageSize);

            var gridModel = new DataSourceResult {
                Data  = documents.documetListModel,
                Total = documents.totalCount
            };

            return(Json(gridModel));
        }