public virtual ActionResult DistinctList(DataSourceRequest command, DistinctDocsModel model, string sort, string sortDir) { var items = _dqQueService.GetAllDistinctDocs(model.ACCT_NAME, model.CIF_ID, model.SOL_ID, model.CUSTOMERTYPE, command.Page - 1, command.PageSize, string.Format("{0} {1}", sort, sortDir)); DateTime _today = DateTime.Now.Date; var gridModel = new DataSourceResult { Data = items.Select(x => new DistinctDocsModel { Id = x.ID, ACCT_NAME = x.ACCT_NAME, DUE_DATE = x.DUE_DATE, BRANCH_NAME = x.BRANCH_NAME, FREZ_REASON_CODE = x.FREZ_REASON_CODE, SOL_ID = x.SOL_ID, ACCTOFFICER_CODE = x.ACCTOFFICER_CODE, ACCTOFFICER_NAME = x.ACCTOFFICER_NAME, CIF_ID = x.CIF_ID, CUSTOMERTYPE = x.CUSTOMERTYPE }), Total = items.TotalCount }; return(Json(gridModel)); }