Ejemplo n.º 1
0
        public DetailViewData(Person currentPerson, Models.TreatmentBMPAssessment treatmentBMPAssessment)
            : base(currentPerson, NeptuneArea.OCStormwaterTools)
        {
            TreatmentBMPAssessment       = treatmentBMPAssessment;
            CurrentPersonCanManage       = CurrentPerson.IsAssignedToStormwaterJurisdiction(treatmentBMPAssessment.TreatmentBMP.StormwaterJurisdictionID);
            ScoreDetailViewData          = new ScoreDetailViewData(treatmentBMPAssessment);
            EditBenchmarkAndThresholdUrl =
                SitkaRoute <TreatmentBMPBenchmarkAndThresholdController> .BuildUrlFromExpression(x =>
                                                                                                 x.Instructions(treatmentBMPAssessment.TreatmentBMP));

            CanEdit = CurrentPersonCanManage && treatmentBMPAssessment.CanEdit(CurrentPerson) && !treatmentBMPAssessment.IsAssessmentComplete;

            EntityName = "Treatment BMP Assessments";
            EntityUrl  = SitkaRoute <AssessmentController> .BuildUrlFromExpression(x => x.Index());

            SubEntityName = treatmentBMPAssessment.TreatmentBMP.TreatmentBMPName;
            SubEntityUrl  = treatmentBMPAssessment.TreatmentBMP.GetDetailUrl();
            PageTitle     = treatmentBMPAssessment.GetAssessmentDate().ToStringDate();

            var carouselImages = TreatmentBMPAssessment.TreatmentBMPAssessmentPhotos;

            ImageCarouselViewData = new ImageCarouselViewData(carouselImages, 400);
        }
Ejemplo n.º 2
0
 public ScoreViewData(Person currentPerson, Models.TreatmentBMPAssessment treatmentBmpAssessment)
     : base(currentPerson, treatmentBmpAssessment, ThisSectionName)
 {
     CalculatedAssessmentScoreFormatted = treatmentBmpAssessment.FormattedScore();
     ScoreDetailViewData = new ScoreDetailViewData(treatmentBmpAssessment);
 }