Ejemplo n.º 1
0
        public IActionResult LawUnits_LoadByGroup(int caseId, int judgeRoleId, int specialityId)
        {
            var caseModel = nomService.GetById <Case>(caseId);
            IEnumerable <CaseSelectionProtokolLawUnitVM> model = null;

            ViewBag.RoleId = judgeRoleId;
            switch (judgeRoleId)
            {
            case NomenclatureConstants.JudgeRole.Judge:
            case NomenclatureConstants.JudgeRole.JudgeReporter:
            case NomenclatureConstants.JudgeRole.ReserveJudge:
            case NomenclatureConstants.JudgeRole.ExtJudge:
                model = service.LawUnit_LoadJudge(caseModel.CourtGroupId ?? 0, caseId, userContext.CourtId, judgeRoleId);
                break;

            case NomenclatureConstants.JudgeRole.Jury:
            case NomenclatureConstants.JudgeRole.ReserveJury:
            case NomenclatureConstants.JudgeRole.ExtJury:
                model = service.LawUnit_LoadJury(caseModel.CourtId, caseModel.Id, specialityId);
                break;
            }
            SetViewBagLawUnits(NomenclatureConstants.SelectionMode.SelectByGroups);
            return(PartialView("_LoadedLawUnits", model));
        }