void SetViewBagEdit(CaseEditVM model) { int?caseCharacter = null; if (!string.IsNullOrEmpty(model.RegNumber)) { caseCharacter = model.CaseCharacterId; } ViewBag.CaseTypeId_ddl = nomService.GetDDL_CaseTypeByDocType(model.DocumentTypeId, caseCharacter); ViewBag.CaseProtokolLawUnit_Count = caseSelectProtokolService.CaseSelectionProtokolLawUnit_SelectCount(model.Id); bool isInitial = string.IsNullOrEmpty(model.RegNumber); var states = nomService.GetDDL_CaseState(isInitial, !isInitial); if (model.CaseStateId == NomenclatureConstants.CaseState.Rejected) { ViewBag.CaseStateId_ddl = states.Where(x => x.Value != NomenclatureConstants.CaseState.New.ToString()).ToList(); } else { ViewBag.CaseStateId_ddl = states; } ViewBag.lastMigration = service.Case_GetPriorCase(model.DocumentId); ViewBag.eisppMigration = service.Case_GetPriorCaseEISPP(model.DocumentId, model.EISSPNumber); ViewBag.ProcessPriorityId_ddl = nomService.GetDropDownList <ProcessPriority>(); //ViewBag.CaseReasonId_ddl = nomService.GetDropDownList<CaseReason>(); ViewBag.ComplexIndexActual_ddl = nomService.GetDDL_ComplexIndex(); ViewBag.ComplexIndexLegal_ddl = nomService.GetDDL_ComplexIndex(); var savedCase = service.GetById <Case>(model.Id); ViewBag.savedCaseStateId = savedCase.CaseStateId; if (NomenclatureConstants.CaseState.UnregisteredManageble.Contains(savedCase.CaseStateId)) { ViewBag.unregisteredManagebleCase = true; var docResolution = docResolutionService.Select(savedCase.DocumentId).FirstOrDefault(); if (docResolution != null) { ViewBag.hasDocResolution = true; ViewBag.docResolutionId = docResolution.Id; } else { ViewBag.hasDocResolution = false; } } if (!string.IsNullOrEmpty(model.RegNumber)) { ViewBag.breadcrumbs = commonService.Breadcrumbs_GetForCase(model.Id); } if (string.IsNullOrEmpty(model.RegNumber)) { SetHelpFile(HelpFileValues.Assignment); } else { SetHelpFile(HelpFileValues.CaseEdit); } }
public IActionResult ListData(IDataTablesRequest request, DocumentResolutionFilterVM filter) { var data = drService.Select(filter); return(request.GetResponse(data)); }