public VirtualPerformanceMeasureValue(PerformanceMeasureReportedValue performanceMeasureReportedValue) { PerformanceMeasure = performanceMeasureReportedValue.PerformanceMeasure; PerformanceMeasureID = PerformanceMeasure.PerformanceMeasureID; ReportedValue = performanceMeasureReportedValue.ReportedValue; PerformanceMeasureSubcategoryOptions = performanceMeasureReportedValue.PerformanceMeasureSubcategoryOptions; PerformanceMeasureSubcategoriesAsString = performanceMeasureReportedValue.PerformanceMeasureSubcategoriesAsString; ProjectID = performanceMeasureReportedValue.Project.ProjectID; Project = performanceMeasureReportedValue.Project; CalendarYear = performanceMeasureReportedValue.CalendarYear; }
public virtual List <PerformanceMeasureReportedValue> GetReportedPerformanceMeasureValues(PerformanceMeasure performanceMeasure, List <Project> projects) { List <PerformanceMeasureActual> performanceMeasureActuals; if (projects == null || !projects.Any()) { performanceMeasureActuals = HttpRequestStorage.DatabaseEntities.PerformanceMeasureActuals.Where(pmav => pmav.PerformanceMeasureID == performanceMeasure.PerformanceMeasureID).ToList(); } else { var projectIDs = projects.Select(x => x.ProjectID).ToList(); performanceMeasureActuals = HttpRequestStorage.DatabaseEntities.PerformanceMeasureActuals.Where( pmav => pmav.PerformanceMeasureID == performanceMeasure.PerformanceMeasureID && projectIDs.Contains(pmav.Project.ProjectID)).ToList(); } var performanceMeasureReportedValues = PerformanceMeasureReportedValue.MakeFromList(performanceMeasureActuals); return(performanceMeasureReportedValues.OrderByDescending(pma => pma.CalendarYear).ThenBy(pma => pma.ProjectName).ToList()); }
public static string GetCalendarYearDisplay(this PerformanceMeasureReportedValue performanceMeasureReportedValue) { return(MultiTenantHelpers.FormatReportingYear(performanceMeasureReportedValue.CalendarYear)); }