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 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 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 ProjectStatuses { get; set; } public List Teams { get; set; } public List Views { get; set; } public List Companies { get; set; } public List ProjectTypes { get; set; } public List Tags { get; set; } public List Clients { get; set; } public bool FilterGroupByTeam { get; set; } public List FilterGroups { get; set; } public Dictionary AdditionalParams { get; set; } public List 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(); Teams = new List(); Views = new List(); Companies = new List(); Clients = new List(); ProjectTypes = new List(); Tags = new List(); FilterGroups = new List(); StrategicGoals = new List(); AdditionalParams = new Dictionary(); } } public class ForecastDashboardChartFilterModel { public DateTime? StartDate { get; set; } public DateTime? EndDate { get; set; } public string Type { get; set; } public List ProjectStatuses { get; set; } public List Teams { get; set; } public List Views { get; set; } public List Companies { get; set; } public List Clients { get; set; } public List ProjectTypes { get; set; } public List FilterGroups { get; set; } public bool IsLaborMode { get; set; } public DashboardChartType ChartType { get; set; } public List StrategicGoals { get; set; } public List Tags { get; set; } public Dictionary AdditionalParams { get; set; } public ForecastDashboardChartFilterModel() { ChartType = DashboardChartType.ProjectsByStatus; ProjectStatuses = new List(); Teams = new List(); Views = new List(); Companies = new List(); Clients = new List(); ProjectTypes = new List(); FilterGroups = new List(); StrategicGoals = new List(); Tags = new List(); AdditionalParams = new Dictionary(); } } 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 FilterGroups { get; set; } public List ProjectTypes { get; set; } public List ProjectStatuses { get; set; } public List Teams { get; set; } public List Views { get; set; } public List Companies { get; set; } public List StrategicGoals { get; set; } public Dictionary AdditionalParams { get; set; } public string PresetColor { get; set; } public bool PieForecastCost { get; set; } public ForecastDashboardPieChartFilterModel() { FilterGroups = new List(); ProjectTypes = new List(); ProjectStatuses = new List(); Teams = new List(); Views = new List(); Companies = new List(); StrategicGoals = new List(); AdditionalParams = new Dictionary(); } } 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 ProjectStatuses { get; set; } public List ProjectTypes { get; set; } public List Clients { get; set; } public List Tags { get; set; } public List StrategicGoals { get; set; } public List Teams { get; set; } public List Views { get; set; } public List Companies { get; set; } public ForecastDashboardNewPieChartFilterModel() { ProjectStatuses = new List(); ProjectTypes = new List(); Clients = new List(); Tags = new List(); StrategicGoals = new List(); Teams = new List(); Views = new List(); Companies = new List(); } } public class ForecastDashboardPerformanceGraphFilterModel { public long TimePoint { get; set; } public int GraphMode { get; set; } public IEnumerable FilterGroups { get; set; } public IEnumerable ProjectTypes { get; set; } public IEnumerable ProjectStatuses { get; set; } public List Teams { get; set; } public List Views { get; set; } public List Companies { get; set; } public List Tags { get; set; } public IEnumerable ProjectFilter { get; set; } public IEnumerable StrategicGoals { get; set; } public IEnumerable Clients { get; set; } public ForecastDashboardPerformanceGraphFilterModel() { FilterGroups = new List(); ProjectTypes = new List(); ProjectStatuses = new List(); Teams = new List(); Views = new List(); Companies = new List(); ProjectFilter = new List(); StrategicGoals = new List(); Clients = new List(); Tags = new List(); } } 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 FilterGroups { get; set; } public Guid? Shown { get; set; } public ForecastDashboardInactiveScenariosFilterModel() { FilterGroups = new List(); } } public class ForecastDashboardChartModel { public DateTime PeriodStartDate { get; set; } public DateTime PeriodEndDate { get; set; } public List WeekEndings { get; set; } public Dictionary ChartData { get; set; } #region Constructors public ForecastDashboardChartModel() { WeekEndings = new List(); ChartData = new Dictionary(); } #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 Hours { get; set; } public List Resources { get; set; } public List Costs { get; set; } public ForecastDashboardChartCapacityModel() { Hours = new List(); Resources = new List(); Costs = new List(); } } 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 Headers { get; set; } #region Constructors public ProjectsByStatusChartModel() { Headers = new List(); } #endregion } public class ToggleScenarioStatusModel { public Guid ScenarioId { get; set; } public DependencyResolveModel Dependencies { get; set; } } }