public virtual ActionResult DocumentsList(DataSourceRequest command, OutstandingDocModel model, string sort, string sortDir) { var items = _dqQueService.GetAllOutDocItems(model.SearchName, model.CIF_ID, model.FORACID, model.BRANCH_CODE, model.CUSTOMERTYPE, command.Page - 1, command.PageSize, string.Format("{0} {1}", sort, sortDir)); //var logItems = _logger.GetAllLogs(createdOnFromValue, createdToFromValue, model.Message, // logLevel, command.Page - 1, command.PageSize); DateTime _today = DateTime.Now.Date; var gridModel = new DataSourceResult { Data = items.Select(x => new OutstandingDocModel { Id = x.ID, ACCT_NAME = x.ACCT_NAME, ACID = x.ACID, FORACID = x.FORACID, DOCUMENT_CODE = x.DOCUMENT_CODE, DUE_DATE = x.DUE_DATE, BRANCH_NAME = x.BRANCH_NAME, REF_DESC = x.REF_DESC, SCHM_CODE = x.SCHM_CODE, SCHM_DESC = x.SCHM_DESC, SCHM_TYPE = x.SCHM_TYPE, 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 //Id = x.RECORD_ID }), Total = items.TotalCount }; return(Json(gridModel)); }
public ActionResult AuthList(string id) { if (!User.Identity.IsAuthenticated) { return(AccessDeniedView()); } var identity = ((CustomPrincipal)User).CustomIdentity; var model = new OutstandingDocModel(); model.CIF_ID = id; var curBranchList = db.CM_BRANCH.Where(a => a.BRANCH_ID == identity.BranchId); model.Branches = new SelectList(curBranchList, "BRANCH_ID", "BRANCH_NAME").ToList(); model.Branches.Add(new SelectListItem { Value = "0", Text = "All", Selected = true }); model.CustomerTypes.Add(new SelectListItem { Value = "Individual", Text = "Individual", }); model.CustomerTypes.Add(new SelectListItem { Value = "Corporate", Text = "Corporate", }); model.CustomerTypes.Add(new SelectListItem { Value = "0", Text = "All", Selected = true }); return(View(model)); }
public virtual ActionResult AuthList(DataSourceRequest command, OutstandingDocModel model, string sort, string sortDir) { var identity = ((CustomPrincipal)User).CustomIdentity; var routeValues = System.Web.HttpContext.Current.Request.RequestContext.RouteData.Values; //RouteValueDictionary routeValues; string goldenRecord = ""; if (routeValues.ContainsKey("id")) { goldenRecord = (string)routeValues["id"]; } var items = _dqQueService.GetAllOutDocItems(model.ACCT_NAME, goldenRecord, model.FORACID, model.BRANCH_CODE, model.CUSTOMERTYPE, command.Page - 1, command.PageSize, string.Format("{0} {1}", sort, sortDir)); var gridModel = new DataSourceResult { Data = items.Select(x => new OutstandingDocModel { Id = x.ID, ACCT_NAME = x.ACCT_NAME, ACID = x.ACID, FORACID = x.FORACID, DOCUMENT_CODE = x.DOCUMENT_CODE, DUE_DATE = x.DUE_DATE, BRANCH_NAME = x.BRANCH_NAME, REF_DESC = x.REF_DESC, SCHM_CODE = x.SCHM_CODE, SCHM_DESC = x.SCHM_DESC, SCHM_TYPE = x.SCHM_TYPE, 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 //Id = x.RECORD_ID }), Total = items.TotalCount, }; return(Json(gridModel)); }