Example #1
0
        protected override BudgetColumnsCalculationsList GetCalculatedColumns(int dsIndex)
        {
            BudgetColumnsCalculationsList columnsList = new BudgetColumnsCalculationsList();

            switch (dsIndex)
            {
            case 0:
                columnsList.Add("TotalHours", EBudgetCalculationMethod.eSUM);
                columnsList.Add("Averate", EBudgetCalculationMethod.eAVG);
                columnsList.Add("ValuedHours", EBudgetCalculationMethod.eSUM);
                columnsList.Add("OtherCosts", EBudgetCalculationMethod.eSUM);
                columnsList.Add("Sales", EBudgetCalculationMethod.eSUM);
                columnsList.Add("NetCosts", EBudgetCalculationMethod.eSUM);
                break;

            default:
                throw new NotImplementedException("Undefinded dataset index: " + dsIndex);
            }
            return(columnsList);
        }
        /// <summary>
        /// Builds a list of columns whose values will be calculated depending on a specified aggregate function
        /// </summary>
        /// <param name="dsIndex"></param>
        /// <returns></returns>
        protected override BudgetColumnsCalculationsList GetCalculatedColumns(int dsIndex)
        {
            BudgetColumnsCalculationsList columnsList = new BudgetColumnsCalculationsList();

            switch (dsIndex)
            {
            //First dataset (on the first tab)
            case 0:
                columnsList.Add("CurrentHours", EBudgetCalculationMethod.eSUM);
                columnsList.Add("UpdateHours", EBudgetCalculationMethod.eSUM);
                columnsList.Add("NewHours", EBudgetCalculationMethod.eSUM);
                columnsList.Add("CurrentVal", EBudgetCalculationMethod.eSUM);
                columnsList.Add("UpdateVal", EBudgetCalculationMethod.eSUM);
                columnsList.Add("NewVal", EBudgetCalculationMethod.eSUM);
                break;

            //Second dataset (on the second tab)
            case 1:
                columnsList.Add("CurrentCost", EBudgetCalculationMethod.eSUM);
                columnsList.Add("UpdateCost", EBudgetCalculationMethod.eSUM);
                columnsList.Add("NewCost", EBudgetCalculationMethod.eSUM);
                columnsList.Add("CurrentSales", EBudgetCalculationMethod.eSUM);
                columnsList.Add("UpdateSales", EBudgetCalculationMethod.eSUM);
                columnsList.Add("NewSales", EBudgetCalculationMethod.eSUM);
                break;

            //Third dataset (on the third tab)
            case 2:
                break;

            default:
                throw new NotImplementedException("Undefinded dataset index: " + dsIndex);
            }
            return(columnsList);
        }