void SetViewbag(int id, int caseId, int?caseSessionId, bool IsViewRowSessionBreadcrumbs = true)
        {
            var modelSession = new CaseSessionVM();

            if (id > 0)
            {
                modelSession      = service.CaseSessionVMById(id);
                ViewBag.IsExpired = modelSession.SessionStateId == NomenclatureConstants.SessionState.Nasrocheno;
            }
            else
            {
                ViewBag.IsExpired = false;
            }

            ViewBag.CaseSessionName        = modelSession.SessionTypeLabel + " " + modelSession.DateFrom.ToString("dd.MM.yyyy");
            ViewBag.CourtHallId            = modelSession.CourtHallId ?? 0;
            ViewBag.SessionTypeId_ddl      = nomService.GetDDL_SessionTypesByCase(caseId);
            ViewBag.SessionStateId_ddl     = nomService.GetDDL_SessionStateRoute(modelSession.SessionStateId);
            ViewBag.CourtHallId_ddl        = commonService.GetDropDownList_CourtHall(userContext.CourtId);
            ViewBag.CaseClassification_ddl = classficationService.CaseClassification_Select(caseId, caseSessionId);
            ViewBag.DateTo_Minutes_ddl     = nomService.GetDDL_SessionDuration();

            if (caseSessionId > 0)
            {
                ViewBag.breadcrumbs = commonService.Breadcrumbs_GetForCaseSession(caseSessionId.Value, IsViewRowSessionBreadcrumbs);
            }
            else
            {
                ViewBag.breadcrumbs = commonService.Breadcrumbs_GetForCase(caseId);
            }
            ViewBag.hasSubstitutions = (lawUnitService.LawUnitSubstitution_SelectForSession(caseSessionId ?? 0) != null) ? lawUnitService.LawUnitSubstitution_SelectForSession(caseSessionId ?? 0).Any() : false;
        }
Exemplo n.º 2
0
 void SetViewbag(int id)
 {
     ViewBag.CaseGroupId_ddl        = nomService.GetDropDownList <CaseGroup>();
     ViewBag.CaseClassification_ddl = classficationService.CaseClassification_Select(id, null);
     ViewBag.breadcrumbs            = commonService.Breadcrumbs_GetForCase(id);
     //ViewBag.CaseTypeId_ddl = nomService.GetDropDownList<CaseType>();
     //ViewBag.CaseCodeId_ddl = nomService.GetDropDownList<CaseCode>();
 }