417 lines
15 KiB
C#
417 lines
15 KiB
C#
using System;
|
|
using System.Data.Entity;
|
|
using System.Linq;
|
|
using EnVisage.Code;
|
|
using System.Collections.Generic;
|
|
using EnVisage.Models.ProjectDependencies;
|
|
|
|
namespace EnVisage.Models
|
|
{
|
|
public class ForecastDashboardModel
|
|
{
|
|
public Guid Id { get; set; }
|
|
public Guid ProjectId { get; set; }
|
|
public Guid? PartId { get; set; }
|
|
public ScenarioType? Type { get; set; }
|
|
public string Name { get; set; }
|
|
public string ProjectName { get; set; }
|
|
public string TeamName { get; set; }
|
|
public string TeamId { get; set; }
|
|
public Guid? ClientId { get; set; }
|
|
public string ClientName { get; set; }
|
|
public Guid? CompanyId { get; set; }
|
|
public string CompanyName { get; set; }
|
|
public decimal? ProjectedRevenue { get; set; }
|
|
public decimal? ExpectedGrossMargin { get; set; }
|
|
public decimal? ExpectedGrossMargin_LM { get; set; }
|
|
public decimal? CalculatedGrossMargin { get; set; }
|
|
public decimal? CalculatedGrossMargin_LM { get; set; }
|
|
public int? UseLMMargin { get; set; }
|
|
public decimal? CGSplit { get; set; }
|
|
public decimal? EFXSplit { get; set; }
|
|
public DateTime? StartDate { get; set; }
|
|
public DateTime? EndDate { get; set; }
|
|
public int? Duration { get; set; }
|
|
public string ProjectType { get; set; }
|
|
public decimal Priority { get; set; }
|
|
public decimal Probability { get; set; }
|
|
public decimal? TDDirectCosts { get; set; }
|
|
public decimal? TDDirectCosts_LM { get; set; }
|
|
public decimal? BUDirectCosts { get; set; }
|
|
public decimal? BUDirectCosts_LM { get; set; }
|
|
public ScenarioStatus? ScenarioStatus { get; set; }
|
|
public List<InactiveScenarioInProjectModel> InactiveScenarios { get; set; }
|
|
public string Color { get; set; }
|
|
public decimal? CostSavings { get; set; }
|
|
public int? CostSavingsDuration { get; set; }
|
|
public DateTime? ROIDate { get; set; }
|
|
public DateTime? ProjectDeadline { get; set; }
|
|
public string HardSoftSavings { get; set; }
|
|
public string StrategicGoals { get; set; }
|
|
|
|
public decimal? PerformanceThresholdYellow { get; set; }
|
|
public decimal? PerformanceThresholdRed { get; set; }
|
|
public string PerformanceColor { get; set; }
|
|
|
|
public string ProjectStatus { get; set; }
|
|
|
|
public List<Guid> Groups { get; set; }
|
|
public decimal? ProjectNetImpact { get; internal set; }
|
|
public decimal? CalculatedMargin { get; internal set; }
|
|
|
|
public ForecastDashboardModel(Guid id, string name, ScenarioType? type, decimal? projectedRevenue, decimal? expectedGrossMargin, decimal? expectedGrossMargin_LM, decimal? calculatedGrossMargin,
|
|
decimal? calculatedGrossMargin_LM, decimal? cGSplit, decimal? eFXSplit, DateTime? startDate, DateTime? endDate, int? duration, decimal priority, decimal probability,
|
|
decimal? tDDirectCosts, decimal? tDDirectCosts_LM, decimal? bUDirectCosts, decimal? bUDirectCosts_LM, decimal? costSavings, int? costSavingsDuration, DateTime? rOIDate, string hardSoftSavings, DateTime? projectDeadline,
|
|
string projectStatus)
|
|
{
|
|
Id = id;
|
|
Name = name;
|
|
Type = type;
|
|
ProjectedRevenue = projectedRevenue;
|
|
ExpectedGrossMargin = expectedGrossMargin;
|
|
ExpectedGrossMargin_LM = expectedGrossMargin_LM;
|
|
CalculatedGrossMargin = calculatedGrossMargin;
|
|
CalculatedGrossMargin_LM = CalculatedGrossMargin_LM;
|
|
CGSplit = cGSplit;
|
|
EFXSplit = eFXSplit;
|
|
StartDate = startDate;
|
|
EndDate = endDate;
|
|
Duration = duration;
|
|
Priority = priority;
|
|
Probability = probability;
|
|
TDDirectCosts = tDDirectCosts;
|
|
TDDirectCosts_LM = tDDirectCosts_LM;
|
|
BUDirectCosts = bUDirectCosts;
|
|
BUDirectCosts_LM = bUDirectCosts_LM;
|
|
CostSavings = costSavings;
|
|
CostSavingsDuration = costSavingsDuration;
|
|
ROIDate = rOIDate;
|
|
HardSoftSavings = hardSoftSavings;
|
|
PerformanceColor = String.Empty;
|
|
ProjectDeadline = projectDeadline;
|
|
ProjectStatus = projectStatus;
|
|
}
|
|
|
|
public ForecastDashboardModel()
|
|
{
|
|
PerformanceColor = String.Empty;
|
|
}
|
|
|
|
}
|
|
|
|
public class ForecastDashboardOptionsModel
|
|
{
|
|
public string MenuId { get; set; }
|
|
public string AdditionalFilterParams { get; set; }
|
|
public string SourcePageModel { get; set; }
|
|
}
|
|
|
|
public class Sort
|
|
{
|
|
public string Field { get; set; }
|
|
|
|
public string Dir { get; set; }
|
|
}
|
|
|
|
public class Aggregator
|
|
{
|
|
public string Field { get; set; }
|
|
|
|
public string Aggregate { get; set; }
|
|
}
|
|
|
|
public class Group
|
|
{
|
|
public string Field { get; set; }
|
|
|
|
public string Dir { get; set; }
|
|
|
|
public Aggregator[] Aggregates { get; set; }
|
|
}
|
|
|
|
public class DataSourceRequest
|
|
{
|
|
public int Page { get; set; }
|
|
|
|
public int PageSize { get; set; }
|
|
|
|
public Sort[] Sort { get; set; }
|
|
|
|
public Group[] Group { get; set; }
|
|
|
|
public Aggregator[] Aggregate { get; set; }
|
|
}
|
|
|
|
public class ForecastDashboardFilterModel
|
|
{
|
|
public DateTime? StartDate { get; set; }
|
|
public DateTime? EndDate { get; set; }
|
|
//public ScenarioType? Type { get; set; }
|
|
public List<Guid> ProjectStatuses { get; set; }
|
|
public List<Guid> Teams { get; set; }
|
|
public List<Guid> Views { get; set; }
|
|
public List<Guid> Companies { get; set; }
|
|
public List<Guid> ProjectTypes { get; set; }
|
|
public List<Guid> Tags { get; set; }
|
|
public List<Guid> Clients { get; set; }
|
|
public bool FilterGroupByTeam { get; set; }
|
|
public List<Guid> FilterGroups { get; set; }
|
|
public Dictionary<string, string> AdditionalParams { get; set; }
|
|
public List<Guid> StrategicGoals { get; set; }
|
|
public bool HasProjectNetImpact { get; set; }
|
|
public bool HasProjectedRevenue { get; set; }
|
|
public bool HasCostSavings { get; set; }
|
|
public bool HasProjectCost { get; set; }
|
|
|
|
public ForecastDashboardFilterModel()
|
|
{
|
|
ProjectStatuses = new List<Guid>();
|
|
Teams = new List<Guid>();
|
|
Views = new List<Guid>();
|
|
Companies = new List<Guid>();
|
|
Clients = new List<Guid>();
|
|
ProjectTypes = new List<Guid>();
|
|
Tags = new List<Guid>();
|
|
FilterGroups = new List<Guid>();
|
|
StrategicGoals = new List<Guid>();
|
|
AdditionalParams = new Dictionary<string, string>();
|
|
}
|
|
}
|
|
|
|
public class ForecastDashboardChartFilterModel
|
|
{
|
|
public DateTime? StartDate { get; set; }
|
|
public DateTime? EndDate { get; set; }
|
|
public string Type { get; set; }
|
|
public List<Guid> ProjectStatuses { get; set; }
|
|
public List<Guid> Teams { get; set; }
|
|
public List<Guid> Views { get; set; }
|
|
public List<Guid> Companies { get; set; }
|
|
public List<Guid> Clients { get; set; }
|
|
public List<Guid> ProjectTypes { get; set; }
|
|
public List<Guid> FilterGroups { get; set; }
|
|
public bool IsLaborMode { get; set; }
|
|
public DashboardChartType ChartType { get; set; }
|
|
public List<Guid> StrategicGoals { get; set; }
|
|
public List<Guid> Tags { get; set; }
|
|
public Dictionary<string, string> AdditionalParams { get; set; }
|
|
|
|
public ForecastDashboardChartFilterModel()
|
|
{
|
|
ChartType = DashboardChartType.ProjectsByStatus;
|
|
ProjectStatuses = new List<Guid>();
|
|
Teams = new List<Guid>();
|
|
Views = new List<Guid>();
|
|
Companies = new List<Guid>();
|
|
Clients = new List<Guid>();
|
|
ProjectTypes = new List<Guid>();
|
|
FilterGroups = new List<Guid>();
|
|
StrategicGoals = new List<Guid>();
|
|
Tags = new List<Guid>();
|
|
AdditionalParams = new Dictionary<string, string>();
|
|
}
|
|
}
|
|
|
|
public class ForecastDashboardPieChartFilterModel
|
|
{
|
|
public DateTime? StartDate { get; set; }
|
|
public DateTime? EndDate { get; set; }
|
|
public bool IsLaborMode { get; set; }
|
|
public bool? IsTypeMode { get; set; }
|
|
public List<Guid> FilterGroups { get; set; }
|
|
public List<Guid> ProjectTypes { get; set; }
|
|
public List<Guid> ProjectStatuses { get; set; }
|
|
public List<Guid> Teams { get; set; }
|
|
public List<Guid> Views { get; set; }
|
|
public List<Guid> Companies { get; set; }
|
|
public List<Guid> StrategicGoals { get; set; }
|
|
public Dictionary<string, string> AdditionalParams { get; set; }
|
|
public string PresetColor { get; set; }
|
|
public bool PieForecastCost { get; set; }
|
|
|
|
public ForecastDashboardPieChartFilterModel()
|
|
{
|
|
FilterGroups = new List<Guid>();
|
|
ProjectTypes = new List<Guid>();
|
|
ProjectStatuses = new List<Guid>();
|
|
Teams = new List<Guid>();
|
|
Views = new List<Guid>();
|
|
Companies = new List<Guid>();
|
|
StrategicGoals = new List<Guid>();
|
|
AdditionalParams = new Dictionary<string, string>();
|
|
}
|
|
}
|
|
|
|
public class ForecastDashboardNewPieChartFilterModel
|
|
{
|
|
public bool IsLaborMode { get; set; }
|
|
public bool PieForecastCost { get; set; }
|
|
|
|
public DateTime? StartDate { get; set; }
|
|
public DateTime? EndDate { get; set; }
|
|
public List<Guid> ProjectStatuses { get; set; }
|
|
public List<Guid> ProjectTypes { get; set; }
|
|
public List<Guid> Clients { get; set; }
|
|
public List<Guid> Tags { get; set; }
|
|
public List<Guid> StrategicGoals { get; set; }
|
|
public List<Guid> Teams { get; set; }
|
|
public List<Guid> Views { get; set; }
|
|
public List<Guid> Companies { get; set; }
|
|
|
|
public ForecastDashboardNewPieChartFilterModel()
|
|
{
|
|
ProjectStatuses = new List<Guid>();
|
|
ProjectTypes = new List<Guid>();
|
|
Clients = new List<Guid>();
|
|
Tags = new List<Guid>();
|
|
StrategicGoals = new List<Guid>();
|
|
Teams = new List<Guid>();
|
|
Views = new List<Guid>();
|
|
Companies = new List<Guid>();
|
|
}
|
|
}
|
|
|
|
public class ForecastDashboardPerformanceGraphFilterModel
|
|
{
|
|
public long TimePoint { get; set; }
|
|
public int GraphMode { get; set; }
|
|
public IEnumerable<Guid> FilterGroups { get; set; }
|
|
public IEnumerable<Guid> ProjectTypes { get; set; }
|
|
public IEnumerable<Guid> ProjectStatuses { get; set; }
|
|
public List<Guid> Teams { get; set; }
|
|
public List<Guid> Views { get; set; }
|
|
public List<Guid> Companies { get; set; }
|
|
public List<Guid> Tags { get; set; }
|
|
public IEnumerable<Guid> ProjectFilter { get; set; }
|
|
public IEnumerable<Guid> StrategicGoals { get; set; }
|
|
public IEnumerable<Guid> Clients { get; set; }
|
|
|
|
public ForecastDashboardPerformanceGraphFilterModel()
|
|
{
|
|
FilterGroups = new List<Guid>();
|
|
ProjectTypes = new List<Guid>();
|
|
ProjectStatuses = new List<Guid>();
|
|
Teams = new List<Guid>();
|
|
Views = new List<Guid>();
|
|
Companies = new List<Guid>();
|
|
ProjectFilter = new List<Guid>();
|
|
StrategicGoals = new List<Guid>();
|
|
Clients = new List<Guid>();
|
|
Tags = new List<Guid>();
|
|
}
|
|
}
|
|
|
|
public class ForecastDashboardInactiveScenariosFilterModel
|
|
{
|
|
public Guid? ProjectId { get; set; }
|
|
public DateTime? StartDate { get; set; }
|
|
public DateTime? EndDate { get; set; }
|
|
public ScenarioType? ScenarioType { get; set; }
|
|
public List<Guid> FilterGroups { get; set; }
|
|
public Guid? Shown { get; set; }
|
|
|
|
public ForecastDashboardInactiveScenariosFilterModel()
|
|
{
|
|
FilterGroups = new List<Guid>();
|
|
}
|
|
}
|
|
|
|
public class ForecastDashboardChartModel
|
|
{
|
|
public DateTime PeriodStartDate { get; set; }
|
|
public DateTime PeriodEndDate { get; set; }
|
|
public List<DateTime> WeekEndings { get; set; }
|
|
public Dictionary<string, ForecastDashboardChartCapacityModel> ChartData { get; set; }
|
|
|
|
#region Constructors
|
|
|
|
public ForecastDashboardChartModel()
|
|
{
|
|
WeekEndings = new List<DateTime>();
|
|
ChartData = new Dictionary<string, ForecastDashboardChartCapacityModel>();
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
public class ForecastDashboardWeeklyCapacityModel
|
|
{
|
|
public decimal Resources { get; set; }
|
|
public decimal Hours { get; set; }
|
|
public decimal Cost { get; set; }
|
|
public string ProjectStatusColor { get; set; }
|
|
}
|
|
|
|
public class ForecastDashboardChartCapacityModel
|
|
{
|
|
public enum ChartCapacityType
|
|
{
|
|
Project,
|
|
NonProjectTime,
|
|
ActualCapacity,
|
|
PlannedCapacity
|
|
}
|
|
|
|
public string Name { get; set; }
|
|
public string Color { get; set; }
|
|
public ChartCapacityType CapacityType { get; set; }
|
|
public List<long[]> Hours { get; set; }
|
|
public List<long[]> Resources { get; set; }
|
|
public List<long[]> Costs { get; set; }
|
|
|
|
public ForecastDashboardChartCapacityModel()
|
|
{
|
|
Hours = new List<long[]>();
|
|
Resources = new List<long[]>();
|
|
Costs = new List<long[]>();
|
|
}
|
|
}
|
|
|
|
public class ForecastDashboardProjectPerformanceModel
|
|
{
|
|
public Guid ForecastScenarioId { get; set; }
|
|
public Guid ActualsScenarioId { get; set; }
|
|
public int ForecastScenarioType { get; set; }
|
|
public decimal? ForecastTotalCost { get; set; }
|
|
public decimal? ActualsTotalCost { get; set; }
|
|
public decimal? VariationPercent { get; set; }
|
|
public Guid ProjectId { get; set; }
|
|
public string ProjectName { get; set; }
|
|
public int? Status { get; set; }
|
|
public decimal? BUDirectCosts { get; set; }
|
|
public DateTime? ScenarioEndDate { get; set; }
|
|
public Guid ProjectTypeId { get; set; }
|
|
public string ProjectTypeName { get; set; }
|
|
public decimal ProjectPriority { get; set; }
|
|
public decimal? ActualsCostForecasted { get; set; }
|
|
public decimal? ActualsCostVariation { get; set; }
|
|
public decimal? ProjectWeight { get; set; }
|
|
public decimal? ForecastTotalQuantity { get; set; }
|
|
public decimal? ActualsTotalQuantity { get; set; }
|
|
public decimal? VariationQuantityPercent { get; set; }
|
|
public decimal? ActualsQuantityVariation { get; set; }
|
|
public DateTime? ScenarioStartDate { get; set; }
|
|
}
|
|
|
|
public class ProjectsByStatusChartModel
|
|
{
|
|
public long PeriodStartDate { get; set; }
|
|
public long PeriodEndDate { get; set; }
|
|
public List<object> Headers { get; set; }
|
|
|
|
#region Constructors
|
|
|
|
public ProjectsByStatusChartModel()
|
|
{
|
|
Headers = new List<object>();
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
public class ToggleScenarioStatusModel
|
|
{
|
|
public Guid ScenarioId { get; set; }
|
|
public DependencyResolveModel Dependencies { get; set; }
|
|
}
|
|
} |