Ejemplo n.º 1
0
        public JsonResult EventMilestoneList(string parentEvent = "", string eventMilestone = "", string eventForTarget = "", int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null)
        {
            var listInputModel = new ListInputModel
            {
                Index     = jtStartIndex,
                PageCount = jtPageSize
            };
            var eventMilestoneFilterInputModel = new EventMilestoneFilterInputModel
            {
                ParentEventDescription    = parentEvent,
                EventMilestoneDescription = eventMilestone,
                EventForTargetDescription = eventForTarget
            };

            if (jtSorting != null)
            {
                var sort = jtSorting.Split(' ');
                listInputModel.OrderBy        = sort[0];
                listInputModel.OrderDirection = sort[1];
            }

            var eventMilestones = _adminPresentationService.GetEventMilestones(listInputModel, eventMilestoneFilterInputModel);

            return(Json(new { Result = "OK", Records = eventMilestones.EventMilestones, TotalRecordCount = eventMilestones.TotalNumberOfEventMilestones }));
        }
Ejemplo n.º 2
0
        public JsonResult UserList(string fullname = "", string username = "", int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null)
        {
            var listInputModel = new ListInputModel
            {
                Index     = jtStartIndex,
                PageCount = jtPageSize
            };

            if (jtSorting != null)
            {
                var sort = jtSorting.Split(' ');
                listInputModel.OrderBy        = sort[0];
                listInputModel.OrderDirection = sort[1];
            }

            var users = _adminPresentationService.GetUsers(fullname, username, listInputModel);

            return(Json(new { Result = "OK", Records = users.Users, TotalRecordCount = users.TotalNumberOfUsers }));
        }
Ejemplo n.º 3
0
        public PeriodBreachesViewModel GetPeriodBreachesReport([ModelBinder(typeof(RoleDataModelBinder))] RoleData role, int weeksToBreach, int?index = null, int?pageCount = null, string patientNHSNumber = null, string patientName = null, string eventDescription = null, string hospital = null, string specialty = null, string clinician = null, string periodType = null, int?advancementOrDelay = null, string orderBy = null, string orderDirection = null)
        {
            var filterInputModel = new BreachFilterInputModel
            {
                EventDescription   = eventDescription,
                NhsNumber          = patientNHSNumber,
                PatientName        = patientName,
                Specialty          = specialty,
                Clinician          = clinician,
                Hospital           = hospital,
                PeriodType         = periodType,
                AdvancementOrDelay = advancementOrDelay
            };

            var listInputModel = new ListInputModel
            {
                Index          = index,
                PageCount      = pageCount,
                OrderBy        = orderBy,
                OrderDirection = orderDirection
            };

            return(_reportPresentationService.GetPeriodBreachesReport(role, weeksToBreach, filterInputModel, listInputModel));
        }