예제 #1
0
        public ActionResult List()
        {
            var model = new DistinctSameCifModel();

            if (!User.Identity.IsAuthenticated)
            {
                return(AccessDeniedView());
            }

            identity           = ((CustomPrincipal)User).CustomIdentity;
            _permissionservice = new PermissionsService(identity.Name, identity.UserRoleId);

            _messagingService.SaveUserActivity(identity.ProfileId, "Viewed Customers With Same CIF Report", DateTime.Now);
            return(View(model));
        }
예제 #2
0
        public virtual ActionResult DistinctSameCifsList(DataSourceRequest command, DistinctSameCifModel model, string sort, string sortDir)
        {
            var items = _dqQueService.GetAllDistinctSameCifs(model.CUST_NAME, model.CUSTOMER_ID, 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 DistinctSameCifModel
                {
                    ID          = x.ID,
                    CUST_NAME   = x.CUST_NAME,
                    CUSTOMER_ID = x.CUSTOMER_ID,
                }),
                Total = items.TotalCount
            };

            return(Json(gridModel));
        }