public ActionResult ReceiveDetailList(DataSourceRequest command, ReceiveDetailSearchCondition condition) { condition.PageNumber = command.Page - 1; condition.PageSize = command.PageSize; var receiveDetails = _receiveService.SearchReceiveDetails(condition); receiveDetails.DataSource.ForEach(x => CalculateAmount(x)); var gridModel = new DataSourceResult { Data = receiveDetails.DataSource, Total = receiveDetails.TotalItems }; return(Json(gridModel)); }