Exemplo n.º 1
0
        private void AddDetailsForNonNHSCountAndArea(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears,
                                                     int totalBridgeCountOrDeckAreaStartRow, int nHSBridgeCountOrDeckAreaStartRow, bool isDeckArea)
        {
            int startRow, startColumn, row, column;

            bridgeWorkSummaryCommon.InitializeLabelCells(worksheet, currentCell, out startRow, out startColumn, out row, out column);
            for (var index = 0; index <= simulationYears.Count; index++)
            {
                var bridgeGood = Convert.ToDouble(worksheet.Cells[totalBridgeCountOrDeckAreaStartRow + 1, column].Value);
                var bridgeFair = Convert.ToDouble(worksheet.Cells[totalBridgeCountOrDeckAreaStartRow + 2, column].Value);
                var bridgePoor = Convert.ToDouble(worksheet.Cells[totalBridgeCountOrDeckAreaStartRow + 3, column].Value);

                var NHSGood = Convert.ToDouble(worksheet.Cells[nHSBridgeCountOrDeckAreaStartRow + 1, column].Value);
                var NHSFair = Convert.ToDouble(worksheet.Cells[nHSBridgeCountOrDeckAreaStartRow + 2, column].Value);
                var NHSPoor = Convert.ToDouble(worksheet.Cells[nHSBridgeCountOrDeckAreaStartRow + 3, column].Value);

                var nonNHSGood = bridgeGood - NHSGood;
                var nonNHSFair = bridgeFair - NHSFair;
                var nonNHSPoor = bridgePoor - NHSPoor;

                worksheet.Cells[startRow, column].Value     = nonNHSGood;
                worksheet.Cells[startRow + 1, column].Value = nonNHSFair;
                worksheet.Cells[startRow + 2, column].Value = nonNHSPoor;
                column++;
            }

            excelHelper.ApplyBorder(worksheet.Cells[startRow, startColumn, row, column - 1]);
            excelHelper.SetCustomFormat(worksheet.Cells[startRow, startColumn + 1, row, column - 1], "Number");
            //if (isDeckArea)
            //{
            //    excelHelper.ApplyColor(worksheet.Cells[row - 1, startColumn + 1, row - 1, column - 1], Color.Khaki);
            //}
            bridgeWorkSummaryCommon.UpdateCurrentCell(currentCell, row + 1, column);
        }
Exemplo n.º 2
0
        public bool Move()
        {
            int @event;

            var isFoodInFront = Observe(out @event);
            var transition    = Ant.Transitions[_currentState, @event];

            if (transition.EndState >= 0 && transition.EndState < Ant.StatesNumber)
            {
                var action = (ArtificialAnt.AntActions)transition.Output;
                _currentState = transition.EndState;

                switch (action)
                {
                case ArtificialAnt.AntActions.Left:
                    CurrentDirection = GetLeftDirection(CurrentDirection);
                    break;

                case ArtificialAnt.AntActions.Right:
                    CurrentDirection = GetRightDirection(CurrentDirection);
                    break;

                case ArtificialAnt.AntActions.Move:
                    CurrentCell = CurrentCell.Next(CurrentDirection, _currentField.FieldWidth, _currentField.FieldHeight);
                    CurrentField[CurrentCell.X, CurrentCell.Y] = false;
                    break;
                }

                return(isFoodInFront && (action == ArtificialAnt.AntActions.Move));
            }

            throw new Exception(String.Format("ends fail: {0}", transition.EndState));
        }
Exemplo n.º 3
0
 /// <summary>
 /// Common piece of code for work summary tab
 /// </summary>
 /// <param name="currentCell"></param>
 /// <param name="startRow"></param>
 /// <param name="startColumn"></param>
 /// <param name="row"></param>
 /// <param name="column"></param>
 public void SetRowColumns(CurrentCell currentCell, out int startRow, out int startColumn, out int row, out int column)
 {
     startRow    = ++currentCell.Row;
     startColumn = 1;
     row         = startRow;
     column      = startColumn;
 }
Exemplo n.º 4
0
        private int FillTotalBudgetSection(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, List <InvestmentLibraryBudgetYearModel> yearlyBudgetModels)
        {
            bridgeWorkSummaryCommon.AddHeaders(worksheet, currentCell, simulationYears, "Total Budget");
            var budgetTotalRow = AddDetailsForTotalBudget(worksheet, simulationYears, currentCell, yearlyBudgetModels);

            return(budgetTotalRow);
        }
        private void AddDetailsForMoneyNeededByBPN(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, List <SimulationDataModel> simulationDataModels, List <BridgeDataModel> bridgeDataModels)
        {
            int startRow, startColumn, row, column;

            bridgeWorkSummaryCommon.InitializeBPNLabels(worksheet, currentCell, out startRow, out startColumn, out row, out column);
            worksheet.Cells[startRow + 4, column - 1].Value = "Annualized Amount";
            worksheet.Cells[startRow + 4, column - 1].Style.HorizontalAlignment = ExcelHorizontalAlignment.Right;
            var totalMoney = 0.0;

            foreach (var year in simulationYears)
            {
                row    = startRow;
                column = ++column;
                var totalMoneyPerYear = AddMoneyNeededByBPN(worksheet, simulationDataModels, bridgeDataModels, row, column, year);
                totalMoney += totalMoneyPerYear;
            }
            for (var i = 0; i < simulationYears.Count; i++)
            {
                worksheet.Cells[row + 4, startColumn + i + 2].Value = totalMoney / simulationYears.Count;
            }
            excelHelper.ApplyBorder(worksheet.Cells[startRow, startColumn, row + 4, column]);
            excelHelper.SetCustomFormat(worksheet.Cells[startRow, startColumn, row + 4, column], "NegativeCurrency");
            excelHelper.ApplyColor(worksheet.Cells[startRow, startColumn + 2, row + 4, column], Color.FromArgb(198, 224, 180));
            bridgeWorkSummaryCommon.UpdateCurrentCell(currentCell, row + 4, column);
        }
Exemplo n.º 6
0
 public void InitializeTotalBridgeCountLabels(ExcelWorksheet worksheet, CurrentCell currentCell, out int startRow, out int startColumn, out int row, out int column)
 {
     SetRowColumns(currentCell, out startRow, out startColumn, out row, out column);
     worksheet.Cells[row++, column].Value   = Properties.Resources.Posted;
     worksheet.Cells[row++, column++].Value = Properties.Resources.Closed;
     worksheet.Cells[row - 2, column - 1, row - 1, column - 1].Style.HorizontalAlignment = ExcelHorizontalAlignment.Right;
 }
Exemplo n.º 7
0
        public override bool Take(BoardCell destinationCell)
        {
            int cellsToMoveUp    = CurrentCell.YLoc - destinationCell.YLoc;
            int cellsToMoveDown  = destinationCell.YLoc - CurrentCell.YLoc;
            int cellsToMoveLeft  = CurrentCell.XLoc - destinationCell.XLoc;
            int cellsToMoveRight = destinationCell.XLoc - CurrentCell.XLoc;

            if (Player.Colour == Game.PlayerColour.White)
            {
                if (cellsToMoveUp == cellsToMoveRight || cellsToMoveUp == cellsToMoveRight ||
                    cellsToMoveDown == cellsToMoveLeft || cellsToMoveDown == cellsToMoveRight)
                {
                    CurrentCell.RemoveChessPiece();        // Remove this piece from this cell
                    destinationCell.PlaceChessPiece(this); // Add this piece to dest cell
                    CurrentCell = destinationCell;
                    return(true);
                }
                return(false);
            }
            else // Player is black
            {
                if (cellsToMoveUp == cellsToMoveRight || cellsToMoveUp == cellsToMoveRight ||
                    cellsToMoveDown == cellsToMoveLeft || cellsToMoveDown == cellsToMoveRight)
                {
                    CurrentCell.RemoveChessPiece();        // Remove this piece from this cell
                    destinationCell.PlaceChessPiece(this); // Add this piece to dest cell
                    CurrentCell = destinationCell;
                    return(true);
                }
                return(false);
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// Fill Work Summary report
        /// </summary>
        /// <param name="worksheet"></param>
        /// <param name="simulationDataModels"></param>
        /// <param name="bridgeDataModels"></param>
        /// <param name="simulationYears"></param>
        /// <param name="dbContext"></param>
        /// <param name="simulationId"></param>
        /// <returns>ChartRowsModel object for usage in other tab reports.</returns>
        public ChartRowsModel Fill(ExcelWorksheet worksheet, List <SimulationDataModel> simulationDataModels, List <BridgeDataModel> bridgeDataModels, List <int> simulationYears, BridgeCareContext dbContext, SimulationModel simulationModel, List <string> treatments)
        {
            var currentCell = new CurrentCell {
                Row = 1, Column = 1
            };
            var yearlyBudgetAmounts = bridgeWorkSummaryData.GetYearlyBudgetAmounts(simulationModel.simulationId, simulationYears, dbContext);

            var comittedProjectsData = workSummaryByBudgetData.GetAllCommittedProjects(simulationModel, dbContext);

            costBudgetsWorkSummary.FillCostBudgetWorkSummarySections(worksheet, currentCell, simulationYears, simulationDataModels, yearlyBudgetAmounts, treatments, comittedProjectsData);

            bridgesCulvertsWorkSummary.FillBridgesCulvertsWorkSummarySections(worksheet, currentCell, simulationYears, simulationDataModels, treatments);

            var chartRowsModel = bridgeRateDeckAreaWorkSummary.FillBridgeRateDeckAreaWorkSummarySections(worksheet, currentCell, simulationYears, simulationDataModels);

            nhsBridgeDeckAreaWorkSummary.FillNHSBridgeDeckAreaWorkSummarySections(worksheet, currentCell, simulationYears, simulationDataModels, bridgeDataModels, chartRowsModel);

            chartRowsModel = deckAreaBridgeWorkSummary.FillPoorDeckArea(worksheet, currentCell, simulationYears, simulationDataModels, bridgeDataModels, chartRowsModel);

            //chartRowsModel = postedClosedBridgeWorkSummary.FillPostedBridgeCount(worksheet, currentCell, simulationYears, simulationDataModels, bridgeDataModels, chartRowsModel);

            //chartRowsModel = deckAreaBridgeWorkSummary.FillPostedDeckArea(worksheet, currentCell, simulationYears, simulationDataModels, bridgeDataModels, chartRowsModel);

            //chartRowsModel = postedClosedBridgeWorkSummary.FillClosedBridgeCount(worksheet, currentCell, simulationYears, simulationDataModels, bridgeDataModels, chartRowsModel);

            //chartRowsModel = deckAreaBridgeWorkSummary.FillClosedDeckArea(worksheet, currentCell, simulationYears, simulationDataModels, bridgeDataModels, chartRowsModel);

            //chartRowsModel = postedClosedBridgeWorkSummary.FillBridgeCountTotal(worksheet, currentCell, simulationYears, simulationDataModels, bridgeDataModels, chartRowsModel);

            chartRowsModel = postedClosedBridgeWorkSummary.FillMoneyNeededByBPN(worksheet, currentCell, simulationYears, simulationDataModels, bridgeDataModels, chartRowsModel);

            worksheet.Calculate();
            worksheet.Cells.AutoFitColumns();
            return(chartRowsModel);
        }
Exemplo n.º 9
0
        private int FillCostOfCulvertWorkSection(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, List <SimulationDataModel> simulationDataModels)
        {
            bridgeWorkSummaryCommon.AddHeaders(worksheet, currentCell, simulationYears, "Cost of Culvert Work");
            var culvertTotalRow = AddCostsOfCulvertWork(worksheet, simulationDataModels, simulationYears, currentCell);

            return(culvertTotalRow);
        }
Exemplo n.º 10
0
 private void FillNonNHSBridgeCountPercentSection(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears,
                                                  int dataStartRow, ChartRowsModel chartRowsModel)
 {
     bridgeWorkSummaryCommon.AddBridgeHeaders(worksheet, currentCell, simulationYears, "Non-NHS Bridge Count Percentage", true);
     chartRowsModel.NonNHSBridgeCountPercentSectionYearsRow = currentCell.Row;
     AddDetailsForNonNHSPercentSection(worksheet, currentCell, simulationYears, dataStartRow);
 }
Exemplo n.º 11
0
        public ExcelRange WriteText(string text)
        {
            var cell = CurrentCell.WriteText(text);

            MoveToNextRow();
            return(cell);
        }
Exemplo n.º 12
0
        public ExcelRange WriteDate(DateTime date, string format = "d MMM yyyy")
        {
            var rnge = CurrentCell.WriteDate(date, format);

            MoveToNextRow();
            return(rnge);
        }
Exemplo n.º 13
0
        private int FillCostOfBridgeWorkSection(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, List <SimulationDataModel> simulationDataModels, List <string> treatments)
        {
            bridgeWorkSummaryCommon.AddHeaders(worksheet, currentCell, simulationYears, "Cost of BAMS Bridge Work", "BAMS Bridge Work Type");
            var bridgeTotalRow = AddCostsOfBridgeWork(worksheet, simulationDataModels, simulationYears, currentCell, treatments);

            return(bridgeTotalRow);
        }
Exemplo n.º 14
0
        public ExcelRange WriteNumber(decimal?number, string format = "#,##0.00  ")
        {
            var rnge = CurrentCell.WriteNumber(number, format);

            MoveToNextRow();
            return(rnge);
        }
Exemplo n.º 15
0
 /// <summary>
 /// Initialize Good, Fair, Poor label cells (common to some sections.)
 /// </summary>
 /// <param name="worksheet"></param>
 /// <param name="currentCell"></param>
 /// <param name="startRow"></param>
 /// <param name="startColumn"></param>
 /// <param name="row"></param>
 /// <param name="column"></param>
 public void InitializeLabelCells(ExcelWorksheet worksheet, CurrentCell currentCell, out int startRow, out int startColumn, out int row, out int column)
 {
     SetRowColumns(currentCell, out startRow, out startColumn, out row, out column);
     worksheet.Cells[row++, column].Value   = Properties.Resources.Good;
     worksheet.Cells[row++, column].Value   = Properties.Resources.Fair;
     worksheet.Cells[row++, column++].Value = Properties.Resources.Poor;
 }
Exemplo n.º 16
0
        private void FillDataInWorkSheet(ExcelWorksheet worksheet, CurrentCell currentCell, BridgeDataModel bridgeData)
        {
            var row    = currentCell.Row;
            var column = currentCell.Column;


            worksheet.Cells[row, column++].Value = bridgeData.BridgeID;
            worksheet.Cells[row, column++].Value = bridgeData.BRKey;
            worksheet.Cells[row, column++].Value = bridgeData.District;
            worksheet.Cells[row, column++].Value = bridgeData.BridgeCulvert;
            worksheet.Cells[row, column++].Value = bridgeData.DeckArea;
            worksheet.Cells[row, column++].Value = bridgeData.StructureLength;
            worksheet.Cells[row, column++].Value = bridgeData.PlanningPartner;
            worksheet.Cells[row, column++].Value = bridgeData.BridgeFamily;
            worksheet.Cells[row, column++].Value = bridgeData.NHS;
            worksheet.Cells[row, column++].Value = bridgeData.BPN;
            worksheet.Cells[row, column++].Value = bridgeData.StructureType;
            worksheet.Cells[row, column++].Value = bridgeData.FunctionalClass;
            worksheet.Cells[row, column++].Value = bridgeData.YearBuilt;
            worksheet.Cells[row, column++].Value = bridgeData.Age;
            worksheet.Cells[row, column++].Value = bridgeData.AdtTotal;
            worksheet.Cells[row, column++].Value = bridgeData.ADTOverTenThousand;
            worksheet.Cells[row, column++].Value = bridgeData.RiskScore;
            worksheet.Cells[row, column++].Value = bridgeData.P3 > 0 ? "Y" : "N";

            currentCell.Column = column;
        }
Exemplo n.º 17
0
        private void AddDetailsForPoorBridgeOnOfRate(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, List <SimulationDataModel> simulationDataModels)
        {
            int startRow, startColumn, row, column;

            bridgeWorkSummaryCommon.SetRowColumns(currentCell, out startRow, out startColumn, out row, out column);
            worksheet.Cells[row++, column].Value = "# Bridge On";
            worksheet.Cells[row++, column].Value = "# Bridge Off";
            column++;
            var fromColumn = column + 1;

            foreach (var year in simulationYears)
            {
                row    = startRow;
                column = ++column;

                var count = bridgeWorkSummaryComputationHelper.CalculatePoorBridgeCount(simulationDataModels, year, "On");
                worksheet.Cells[row, column].Value = count;

                count = bridgeWorkSummaryComputationHelper.CalculatePoorBridgeCount(simulationDataModels, year, "Off");
                worksheet.Cells[++row, column].Value = count;
            }
            excelHelper.ApplyBorder(worksheet.Cells[startRow, startColumn, row, column]);
            excelHelper.ApplyColor(worksheet.Cells[startRow, fromColumn, row, column], Color.Khaki);
            bridgeWorkSummaryCommon.UpdateCurrentCell(currentCell, ++row, column);
        }
Exemplo n.º 18
0
    private void UpdateCurrentTile()
    {
        //What sort of tile are we on
        Cell currentTile = CurrentCell;

        CurrentCell = Map.GetClosestTile(transform.position);

        if (currentTile != null && currentTile != CurrentCell)
        {
            //We've changed tiles, make sure the old tile is no longer occupied
            currentTile.NoLongerOccupied(self);
            if (!CurrentCell.Occupied)
            {
                //Since we've changed, our next tile should equal the target tile
                if (CurrentCell != TCell)
                {
                    //If it doesn't equal then we've drifted off the tiles slightly, set the current tile the target tile
                    CurrentCell = TCell;
                }


                if (Path != null)
                {
                    if (Path.Count == 1)
                    {
                        CurrentCell.SetOccupied(self, true);
                    }
                    else
                    {
                        CurrentCell.SetOccupied(self, false);
                    }
                }
            }
        }
    }
Exemplo n.º 19
0
        private void AddDynamicDataCells(ExcelWorksheet worksheet, List <int> simulationYears, List <UnfundedRecommendationModel> unfundedRecommendations,
                                         List <BridgeDataModel> bridgeDataModels, CurrentCell currentCell)
        {
            currentCell.Row    = 4; // Data starts here
            currentCell.Column = 1;
            var brKeys = unfundedRecommendations.Select(_ => _.BRKey).Distinct();

            foreach (var id in brKeys)
            {
                var perBRKeyData = unfundedRecommendations.Where(_ => _.BRKey == id).OrderBy(o => o.YEARS);
                var bridgeData   = bridgeDataModels.Where(b => b.BRKey.ToString() == id).FirstOrDefault();
                if (!perBRKeyData.Select(p => p.Reason).Contains("Selected"))
                {
                    FillDataInWorkSheet(worksheet, currentCell, bridgeData);
                    foreach (var year in simulationYears)
                    {
                        if (!perBRKeyData.Where(y => y.YEARS == year).Any())
                        {
                            currentCell.Column++;
                            continue;
                        }
                        var yearlyData   = perBRKeyData.Where(y => y.YEARS == year);
                        var minValue     = yearlyData.Select(_ => _.TotalProjectCost).Min();
                        var selectedData = yearlyData.Where(t => t.TotalProjectCost == minValue).FirstOrDefault();

                        worksheet.Cells[currentCell.Row, currentCell.Column++].Value = selectedData.Treatment;
                    }
                }
                else
                {
                    var yearDataWithSelectedTreatment = perBRKeyData.Where(_ => _.Reason.Contains("Selected")).LastOrDefault();
                    if (!perBRKeyData.Any(_ => _.YEARS > yearDataWithSelectedTreatment.YEARS))
                    {
                        continue;
                    }
                    FillDataInWorkSheet(worksheet, currentCell, bridgeData);
                    foreach (var year in simulationYears)
                    {
                        if (year <= yearDataWithSelectedTreatment.YEARS)
                        {
                            currentCell.Column++;
                            continue;
                        }
                        if (!perBRKeyData.Where(y => y.YEARS == year).Any())
                        {
                            currentCell.Column++;
                            continue;
                        }
                        var yearlyData   = perBRKeyData.Where(y => y.YEARS == year);
                        var minValue     = yearlyData.Select(_ => _.TotalProjectCost).Min();
                        var selectedData = yearlyData.Where(t => t.TotalProjectCost == minValue).FirstOrDefault();

                        worksheet.Cells[currentCell.Row, currentCell.Column++].Value = selectedData.Treatment;
                    }
                }
                currentCell.Row++;
                currentCell.Column = 1;
            }
        }
Exemplo n.º 20
0
 /// <summary>
 /// Initialize Good, Fair, Poor label cells (common to some sections.)
 /// </summary>
 /// <param name="worksheet"></param>
 /// <param name="currentCell"></param>
 /// <param name="startRow"></param>
 /// <param name="startColumn"></param>
 /// <param name="row"></param>
 /// <param name="column"></param>
 public void InitializeLabelCells(ExcelWorksheet worksheet, CurrentCell currentCell, out int startRow, out int startColumn, out int row, out int column)
 {
     SetRowColumns(currentCell, out startRow, out startColumn, out row, out column);
     worksheet.Cells[row++, column].Value   = Properties.Resources.Good;
     worksheet.Cells[row++, column].Value   = Properties.Resources.Fair;
     worksheet.Cells[row++, column++].Value = Properties.Resources.Poor;
     worksheet.Cells[row - 3, column - 1, row - 1, column - 1].Style.HorizontalAlignment = ExcelHorizontalAlignment.Right;
 }
Exemplo n.º 21
0
        /// <summary>
        /// Fill sections with bridges and culverts details
        /// </summary>
        /// <param name="worksheet"></param>
        /// <param name="currentCell"></param>
        /// <param name="simulationYears"></param>
        /// <param name="simulationDataModels"></param>
        public void FillBridgesCulvertsWorkSummarySections(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, List <SimulationDataModel> simulationDataModels)
        {
            var projectRowNumberModel = new ProjectRowNumberModel();

            FillNumberOfCulvertsWorkedOnSection(worksheet, currentCell, simulationYears, simulationDataModels, projectRowNumberModel);
            FillNumberOfBridgesWorkedOnSection(worksheet, currentCell, simulationYears, simulationDataModels, projectRowNumberModel);
            FillNumberOfBridgesCulvertsWorkedOnSection(worksheet, currentCell, simulationYears, projectRowNumberModel);
        }
Exemplo n.º 22
0
        public ExcelRange WriteDifferenceFormula(string minuendAddress, string subtrahendAddress, string format = "#,##0.00  ")
        {
            var fmla = $"={minuendAddress} - {subtrahendAddress}";
            var cell = CurrentCell.WriteFormula(fmla, format);

            MoveToNextRow();
            return(cell);
        }
Exemplo n.º 23
0
        public ExcelRange WritePercentFormula(string numeratorAddress, string denominatorAddress, string format = "#,##0.00 %  ")
        {
            var fmla = $"={numeratorAddress} / {denominatorAddress}";
            var cell = CurrentCell.WriteFormula(fmla, format);

            MoveToNextRow();
            return(cell);
        }
Exemplo n.º 24
0
 internal ChartRowsModel FillClosedBridgeCount(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, List <SimulationDataModel> simulationDataModels, List <BridgeDataModel> bridgeDataModels, ChartRowsModel chartRowsModel)
 {
     //excelHelper.ApplyColor(worksheet.Cells[currentCell.Row, 1, currentCell.Row, worksheet.Dimension.Columns], Color.LightGray);
     bridgeWorkSummaryCommon.AddBridgeHeaders(worksheet, currentCell, simulationYears, "Closed Bridges - Count", true);
     chartRowsModel.TotalClosedBridgeCountByBPNYearsRow = currentCell.Row;
     AddDetailsForClosedBridgeCount(worksheet, currentCell, simulationYears, simulationDataModels, bridgeDataModels);
     return(chartRowsModel);
 }
Exemplo n.º 25
0
        private int FillNHSBridgeDeckAreaSection(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, List <SimulationDataModel> simulationDataModels, List <BridgeDataModel> bridgeDataModels)
        {
            bridgeWorkSummaryCommon.AddBridgeHeaders(worksheet, currentCell, simulationYears, "NHS Bridge Deck Area", true);
            var dataStartRow = currentCell.Row + 1;

            AddDetailsForNHSBridgeDeckArea(worksheet, currentCell, simulationYears, simulationDataModels, bridgeDataModels);
            return(dataStartRow);
        }
Exemplo n.º 26
0
        private int FillTotalBridgeCountPercent(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, int dataStartRow)
        {
            bridgeWorkSummaryCommon.AddBridgeHeaders(worksheet, currentCell, simulationYears, "Total Bridge Count Percentage", true);
            var totalBridgeCountPercentYearsRow = currentCell.Row;

            AddDetailsForTotalBridgeAndDeckPercent(worksheet, currentCell, simulationYears, dataStartRow);
            return(totalBridgeCountPercentYearsRow);
        }
Exemplo n.º 27
0
        private int FillTotalBridgeCountSection(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, List <SimulationDataModel> simulationDataModels)
        {
            bridgeWorkSummaryCommon.AddBridgeHeaders(worksheet, currentCell, simulationYears, "Total Bridge Count", true);
            var totalBridgeCountSectionYearsRow = currentCell.Row;

            AddDetailsForTotalBridgeCount(worksheet, currentCell, simulationYears, simulationDataModels);
            return(totalBridgeCountSectionYearsRow);
        }
Exemplo n.º 28
0
        private int FillNonNHSBridgeCountSection(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, int totalBridgeCountSectionStartRow, int nHSBridgeCountSectionStartRow, ChartRowsModel chartRowsModel)
        {
            bridgeWorkSummaryCommon.AddBridgeHeaders(worksheet, currentCell, simulationYears, "Non-NHS Bridge Count", true);
            var dataStartRow = currentCell.Row + 1;

            AddDetailsForNonNHSCountAndArea(worksheet, currentCell, simulationYears, totalBridgeCountSectionStartRow, nHSBridgeCountSectionStartRow, false);
            return(dataStartRow);
        }
Exemplo n.º 29
0
        private int FillCostOfCommittedWorkSection(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears,
                                                   List <WorkSummaryByBudgetModel> comittedProjectsData)
        {
            bridgeWorkSummaryCommon.AddHeaders(worksheet, currentCell, simulationYears, "Cost of MPMS Work", "MPMS Work Type");
            var committedTotalRow = AddCostsOfCommittedWork(worksheet, simulationYears, currentCell, comittedProjectsData);

            return(committedTotalRow);
        }
Exemplo n.º 30
0
        /// <summary>
        ///  Fill sections with cost and budget details
        /// </summary>
        /// <param name="worksheet"></param>
        /// <param name="currentCell"></param>
        /// <param name="simulationYears"></param>
        /// <param name="simulationDataModels"></param>
        public void FillCostBudgetWorkSummarySections(ExcelWorksheet worksheet, CurrentCell currentCell, List <int> simulationYears, List <SimulationDataModel> simulationDataModels, List <InvestmentLibraryBudgetYearModel> yearlyBudgetModels)
        {
            var culvertTotalRow = FillCostOfCulvertWorkSection(worksheet, currentCell, simulationYears, simulationDataModels);
            var bridgeTotalRow  = FillCostOfBridgeWorkSection(worksheet, currentCell, simulationYears, simulationDataModels);
            var budgetTotalRow  = FillTotalBudgetSection(worksheet, currentCell, simulationYears, yearlyBudgetModels);

            FillRemainingBudgetSection(worksheet, simulationYears, currentCell, culvertTotalRow, bridgeTotalRow, budgetTotalRow);
        }