コード例 #1
0
 public EditPerformanceMeasureTargetsViewData(ProjectFirmaModels.Models.PerformanceMeasure performanceMeasure,
                                              EditPerformanceMeasureTargetsViewDataForAngular viewDataForAngular,
                                              PerformanceMeasureTargetType performanceMeasureTargetType)
 {
     PerformanceMeasure = performanceMeasure;
     ViewDataForAngular = viewDataForAngular;
     PerformanceMeasureFieldDefinition = FieldDefinitionEnum.PerformanceMeasure.ToType();
     ShowGeoSpatialAreaInstructions    = performanceMeasureTargetType == PerformanceMeasureTargetType.TargetByGeospatialArea;
 }
コード例 #2
0
        private ActionResult ViewEditPerformanceMeasureReportedValues(PerformanceMeasure performanceMeasure,
                                                                      EditPerformanceMeasureTargetsViewModel viewModel)
        {
            var performanceMeasureTargetValueTypes = PerformanceMeasureTargetValueType.All.ToList();
            var reportingPeriods           = performanceMeasure.GetPerformanceMeasureReportingPeriodsFromTargetsAndActuals();
            var defaultReportingPeriodYear = reportingPeriods.Any()
                ? reportingPeriods.Max(x => x.PerformanceMeasureReportingPeriodCalendarYear) + 1
                : DateTime.Now.Year;
            var viewDataForAngular = new EditPerformanceMeasureTargetsViewDataForAngular(performanceMeasure,
                                                                                         defaultReportingPeriodYear,
                                                                                         performanceMeasureTargetValueTypes,
                                                                                         false);
            var viewData = new EditPerformanceMeasureTargetsViewData(performanceMeasure, viewDataForAngular,
                                                                     EditPerformanceMeasureTargetsViewData.PerformanceMeasureTargetType.TargetByYear);

            return(RazorPartialView <EditPerformanceMeasureTargets, EditPerformanceMeasureTargetsViewData,
                                     EditPerformanceMeasureTargetsViewModel>(viewData, viewModel));
        }