Exemplo n.º 1
0
        public IActionResult LoadTable(AuditIndexViewModel model)
        {
            //var model = new AuditIndexViewModel();
            var returnModel = _auditService.GetAuditTypeReport(model.StartDate, model.EndDate);

            return(PartialView("_AuditTable", returnModel));
        }
Exemplo n.º 2
0
        public IActionResult Index()
        {
            if (!_identityUIEndpoints.ShowAuditToUser)
            {
                return(NotFound());
            }

            AuditIndexViewModel auditIndexViewModel = _auditDataService.GetIndexViewModel();

            return(View(auditIndexViewModel));
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
        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)));
        }
Exemplo n.º 6
0
        public IActionResult Index()
        {
            AuditIndexViewModel auditIndexViewModel = _auditDataService.GetIndexViewModel();

            return(View(auditIndexViewModel));
        }