コード例 #1
0
        public IActionResult LoadTable(AuditIndexViewModel model)
        {
            //var model = new AuditIndexViewModel();
            var returnModel = _auditService.GetAuditTypeReport(model.StartDate, model.EndDate);

            return(PartialView("_AuditTable", returnModel));
        }
コード例 #2
0
        public IActionResult Index()
        {
            if (!_identityUIEndpoints.ShowAuditToUser)
            {
                return(NotFound());
            }

            AuditIndexViewModel auditIndexViewModel = _auditDataService.GetIndexViewModel();

            return(View(auditIndexViewModel));
        }
コード例 #3
0
        public AuditIndexViewModel GetIndexViewModel()
        {
            List <Select2ItemBase <long?> > actionTypes = Enum.GetValues(typeof(ActionTypes))
                                                          .Cast <ActionTypes>()
                                                          .Select(x => new Select2ItemBase <long?>(
                                                                      id: (long)x,
                                                                      text: x.ToString()))
                                                          .ToList();

            actionTypes.Insert(0, new Select2ItemBase <long?>(
                                   id: null,
                                   text: "All"));

            AuditIndexViewModel auditIndexViewModel = new AuditIndexViewModel(
                actionTypes: actionTypes);

            return(auditIndexViewModel);
        }
コード例 #4
0
        public AuditIndexViewModel GetIndexViewModel()
        {
            List <Select2ItemBase <long?> > actionTypes = Enum.GetValues(typeof(ActionTypes))
                                                          .Cast <ActionTypes>()
                                                          .Select(x => new Select2ItemBase <long?>(
                                                                      id: (long)x,
                                                                      text: x.GetDescription()))
                                                          .ToList();

            List <Select2ItemBase <long?> > subjectTypes = Enum.GetValues(typeof(SubjectTypes))
                                                           .Cast <SubjectTypes>()
                                                           .Select(x => new Select2ItemBase <long?>(
                                                                       id: (long)x,
                                                                       text: x.GetDescription()))
                                                           .ToList();

            AuditIndexViewModel auditIndexViewModel = new AuditIndexViewModel(
                actionTypes: actionTypes,
                subjectTypes: subjectTypes);

            return(auditIndexViewModel);
        }
コード例 #5
0
        public Task <Result <AuditIndexViewModel> > GetIndexViewModel(string groupId)
        {
            List <Select2ItemBase <long?> > actionTypes = Enum.GetValues(typeof(ActionTypes))
                                                          .Cast <ActionTypes>()
                                                          .Select(x => new Select2ItemBase <long?>(
                                                                      id: (long)x,
                                                                      text: x.GetDescription()))
                                                          .ToList();

            List <Select2ItemBase <long?> > subjectTypes = Enum.GetValues(typeof(SubjectTypes))
                                                           .Cast <SubjectTypes>()
                                                           .Select(x => new Select2ItemBase <long?>(
                                                                       id: (long)x,
                                                                       text: x.GetDescription()))
                                                           .ToList();

            AuditIndexViewModel auditIndexViewModel = new AuditIndexViewModel(
                groupId: groupId,
                actionTypes: actionTypes,
                subjectTypes: subjectTypes);

            return(Task.FromResult(Result.Ok(auditIndexViewModel)));
        }
コード例 #6
0
        public IActionResult Index()
        {
            AuditIndexViewModel auditIndexViewModel = _auditDataService.GetIndexViewModel();

            return(View(auditIndexViewModel));
        }