Exemple #1
0
        public ActionResult ExpDocumentView(Guid id)
        {
            var stage = expRepo.GetAssessmentStage(id);
            var model = stage.OBK_AssessmentDeclaration;

            var expDocResult = expRepo.GetStageExpDocResult(model.Id);

            if (expDocResult != null)
            {
                var booleans = new ReadOnlyDictionaryRepository().GetUOBKCheck();
                ViewData["UObkExpertiseResult"] = new SelectList(booleans, "ExpertiseResult", "Name", expDocResult.ExpResult);
            }
            else
            {
                var booleans = new ReadOnlyDictionaryRepository().GetUOBKCheck();
                ViewData["UObkExpertiseResult"] = new SelectList(booleans, "ExpertiseResult", "Name");
            }

            //// номерклатура
            //var nomeclature = new AssessmentStageRepository().GetRefNomenclature();
            //ViewData["UObkNomenclature"] = new SelectList(nomeclature, "Id", "Name");
            ////основание
            //var reasons = new SafetyAssessmentRepository().GetRefReasons();
            //ViewData["UObkReasons"] = new SelectList(reasons, "ExpertiseResult", "Name");

            return(PartialView(model));
        }
Exemple #2
0
        public ActionResult ExpDocumentView(Guid id)
        {
            var stage = expRepo.GetAssessmentStage(id);
            var model = stage.OBK_AssessmentDeclaration;


            var expDocResult = expRepo.GetStageExpDocResult(model.Id);

            if (expDocResult != null)
            {
                ViewBag.HasExpDocumentResult = true;
                var booleans = new ReadOnlyDictionaryRepository().GetUOBKCheck();
                ViewData["UObkExpertiseResult"] = new SelectList(booleans, "ExpertiseResult", "Name", expDocResult.ExpResult);
            }
            else
            {
                ViewBag.HasExpDocumentResult = false;
                var booleans = new ReadOnlyDictionaryRepository().GetUOBKCheck();
                ViewData["UObkExpertiseResult"] = new SelectList(booleans, "ExpertiseResult", "Name");
            }

            ViewData["OBKRefReasonList"] = new SelectList(expRepo.OBKRefReasonList(), "Id", "NameRu");

            ViewData["ExecutorType"]    = expRepo.ExecutorType(model.Id);
            ViewData["SignExpDocument"] = expRepo.checkSignData(stage.Id);

            var stageObj = db.OBK_Ref_StageStatus.FirstOrDefault(o => o.Id == stage.StageStatusId);

            ViewData["StageStatus"] = stageObj.Code;

            return(PartialView(model));
        }