Ejemplo n.º 1
0
        public void SpendBudget(float fAmount, String strBudget, String strYear)
        {
            if (strBudget == null)
            {
                return;
            }
            if (!BudgetYear.Contains(strBudget))
            {
                return;
            }
            Hashtable hashYearAmount = (Hashtable)BudgetYear[strBudget];

            if (!hashYearAmount.Contains(strYear))
            {
                return;
            }
            float fAvailable = (float)hashYearAmount[strYear];

            hashYearAmount.Remove(strYear);
            fAvailable = fAvailable - fAmount;
            hashYearAmount.Add(strYear, fAvailable);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Check if budget can support treatment.  For targets and deficiency met.
        /// </summary>
        /// <param name="fAmount"></param>
        /// <param name="strBudget"></param>
        /// <param name="strYear"></param>
        /// <returns>The budget that is available</returns>
        public string IsBudgetAvailable(float fAmount, String strBudget, String strYear)
        {
            string[] budgets = strBudget.Split('|');

            foreach (string budget in budgets)
            {
                string budgetCheck = budget.Trim();

                //Budget not defined
                if (!BudgetYear.Contains(budgetCheck))
                {
                    continue;
                }
                Hashtable hashYearAmount = (Hashtable)BudgetYear[budgetCheck];
                if (!hashYearAmount.Contains(strYear))
                {
                    continue;
                }
                float fAvailable = (float)hashYearAmount[strYear];

                if (!BudgetYearOriginal.Contains(budgetCheck))
                {
                    continue;
                }
                Hashtable hashYearAmountOriginal = (Hashtable)BudgetYearOriginal[budgetCheck];
                if (!hashYearAmountOriginal.Contains(strYear))
                {
                    continue;
                }
                float fOriginal      = (float)hashYearAmountOriginal[strYear];
                float fAfterSpending = fAvailable - fAmount;
                if (fAfterSpending >= 0)
                {
                    return(budgetCheck);
                }
            }
            return(null);
        }
Ejemplo n.º 3
0
        public void MoveBudgetAcross(string budget, string year, Priorities priority)
        {
            //Get next budget.
            var nextBudget = GetNextBudget(budget);

            //Add what is left from current budget (and priority) to the the next budget.

            string    budgetCheck = budget.Trim();
            Hashtable hashYearAmount;
            Hashtable hashYearAmountOriginal;
            float     available = 0;
            float     original  = 0;

            //Budget not defined
            try
            {
                if (!BudgetYear.Contains(budgetCheck))
                {
                    return;
                }
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking budget year. " + e.Message));
                throw e;
            }


            try
            {
                hashYearAmount = (Hashtable)BudgetYear[budgetCheck];
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year. " + e.Message));
                throw e;
            }
            try
            {
                if (!hashYearAmount.Contains(year))
                {
                    return;
                }
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking year amount. " + e.Message));
                throw e;
            }

            try
            {
                available = (float)hashYearAmount[year];
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving year amount. " + e.Message));
                throw e;
            }

            try
            {
                if (!BudgetYearOriginal.Contains(budgetCheck))
                {
                    return;
                }
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking budget year original. " + e.Message));
                throw e;
            }

            try
            {
                hashYearAmountOriginal = (Hashtable)BudgetYearOriginal[budgetCheck];
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year original. " + e.Message));
                throw e;
            }


            try
            {
                if (!hashYearAmountOriginal.Contains(year))
                {
                    return;
                }
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking year amount original. " + e.Message));
                throw e;
            }

            try
            {
                original = (float)hashYearAmountOriginal[year];
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving year amount original. " + e.Message));
                throw e;
            }


            if (original <= 0)
            {
                return;
            }
            var percent = (1 - available / original) * 100;

            try
            {
                var percentLimit = (float)priority.BudgetPercent[budgetCheck];
                if (percent < percentLimit)
                {
                    var difference   = percentLimit - percent;
                    var budgetToMove = original * difference / 100;
                    hashYearAmount[year] = (float)hashYearAmount[year] - budgetToMove;

                    hashYearAmount       = (Hashtable)BudgetYear[nextBudget];
                    hashYearAmount[year] = (float)hashYearAmount[year] + budgetToMove;
                }
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year original. " + e.Message));
                throw e;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Check if budget can support treatment.  Checks for each priority.
        /// </summary>
        /// <param name="fAmount"></param>
        /// <param name="strBudget"></param>
        /// <param name="strYear"></param>
        /// <param name="hashAttributeValue"></param>
        /// <param name="priority"></param>
        /// <param name="limits">Limits where treatments are split over multiple years</param>
        /// <returns></returns>
        public string IsBudgetAvailable(float fAmount, string strBudget, String strYear, Hashtable hashAttributeValue, Priorities priority, List <ISplitTreatmentLimit> limits, string budgetLimitType, out string budgetHash, out ISplitTreatmentLimit splitTreatmentLimit, out string reasonNoBudget)
        {
            reasonNoBudget = "";
            string noBudgetAvailable = "";

            splitTreatmentLimit = limits[0];

            //Check priority.  If not possible just return null.
            if (!(priority.IsAllSections || priority.Criteria.IsCriteriaMet(hashAttributeValue)))
            {
                budgetHash     = "";
                reasonNoBudget = "Priority (" + priority.PriorityLevel + ") criteria not met for year " + strYear;
                return(noBudgetAvailable);
            }

            string[] possibleBudgets;


            foreach (var limit in limits)
            {
                if (limit.Amount > fAmount)
                {
                    splitTreatmentLimit = limit;
                    break;
                }
            }



            budgetHash = "";
            try
            {
                possibleBudgets = strBudget.Split('|');

                for (int i = 0; i < possibleBudgets.Length; i++)
                {
                    possibleBudgets[i] = possibleBudgets[i].Trim();
                }
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Budget is null." + e.Message));
                throw e;
            }

            //If there are no budget criteria, then ignore.  The list is enforced.

            var budgets = new List <string>();

            if (SimulationMessaging.BudgetCriterias.Count > 0)
            {
                var listAvailableBudget = new List <BudgetCriteria>();
                foreach (var budgetCriteria in SimulationMessaging.BudgetCriterias)
                {
                    if (budgetCriteria.Criteria.IsCriteriaMet(hashAttributeValue))
                    {
                        listAvailableBudget.Add(budgetCriteria);
                    }
                }


                foreach (var budget in possibleBudgets)
                {
                    var available = listAvailableBudget.Find(b => b.BudgetName == budget);
                    if (available != null && !budgets.Contains(available.BudgetName))
                    {
                        budgets.Add(available.BudgetName);
                    }
                }
            }
            else
            {
                foreach (var budget in possibleBudgets)
                {
                    budgets.Add(budget);
                }
            }

            if (budgets.Count == 0)
            {
                reasonNoBudget = "Budget (" + strBudget + ") did not meet budget criteria.";
            }

            foreach (string budget in budgets)
            {
                string    budgetCheck = budget.Trim();
                Hashtable hashYearAmount;
                Hashtable hashYearAmountOriginal;
                float     fAvailable;
                float     fOriginal;
                float     fAfterSpending;
                float     fPercent;

                //Budget not defined
                try
                {
                    if (!BudgetYear.Contains(budgetCheck))
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking budget year. " + e.Message));
                    throw e;
                }


                try
                {
                    hashYearAmount = (Hashtable)BudgetYear[budgetCheck];
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year. " + e.Message));
                    throw e;
                }

                try
                {
                    if (!BudgetYearOriginal.Contains(budgetCheck))
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking budget year original. " + e.Message));
                    throw e;
                }

                bool currentBudgetAvailable = true;

                if (budgetLimitType.ToLower() == "unlimited")//If the budget is available (possible budget) and is unlimited... we are good.
                {
                    return(budgetCheck);
                }


                //Starting here need to loop through year amounts.
                var year = Convert.ToInt32(strYear);
                for (int i = 0; i < splitTreatmentLimit.Percentages.Count; i++)
                {
                    var currentYearAmount = fAmount * splitTreatmentLimit.Percentages[i] / 100;
                    var currentYear       = year + i;

                    //Priority must be all years, match the current year or the current year must be greater than maximum year and the Maximum year must be a priority.
                    if (!(priority.IsAllYears || priority.Years == currentYear || (currentYear > MaximumYear && priority.Years == MaximumYear)))
                    {
                        reasonNoBudget = "Priority is not set for year " + currentYear;
                        return(null);
                    }

                    try
                    {
                        //This occurs when a split treament goes past then end.
                        if (!hashYearAmount.Contains(currentYear.ToString()))
                        {
                            continue;
                        }
                        //Not past end of analysis.
                        fAvailable = (float)hashYearAmount[currentYear.ToString()];
                    }
                    catch (Exception e)
                    {
                        SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving year amount. " + e.Message));
                        throw e;
                    }


                    //This gets a hash of all years and the amount of budgets originally available.
                    try
                    {
                        hashYearAmountOriginal = (Hashtable)BudgetYearOriginal[budgetCheck];
                        //This occurs when a split treament goes pas then end.
                        if (!hashYearAmountOriginal.ContainsKey(currentYear.ToString()))
                        {
                            continue;
                        }
                    }
                    catch (Exception e)
                    {
                        SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year original. " + e.Message));
                        throw e;
                    }


                    try
                    {
                        if (!hashYearAmountOriginal.Contains(currentYear.ToString()))
                        {
                            continue;
                        }
                        fOriginal = (float)hashYearAmountOriginal[currentYear.ToString()];
                    }
                    catch (Exception e)
                    {
                        SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving year amount original. " + e.Message));
                        throw e;
                    }

                    fAfterSpending = fAvailable - currentYearAmount;
                    if (fOriginal <= 0)
                    {
                        continue;
                    }
                    fPercent = (1 - fAfterSpending / fOriginal) * 100;


                    try
                    {
                        float fPercentLimit = (float)priority.BudgetPercent[budgetCheck];
                        var   original      = (float)priority.BudgetPercent[budgetCheck] * fOriginal / 100;
                        budgetHash = currentYearAmount.ToString("#,##0.##") + "/" + fAmount.ToString("#,##0.##") + "/" + fAvailable.ToString("#,##0.##") + "/" + original.ToString("#,##0.##");
                        //if (fPercent < fPercentLimit) return budgetCheck;
                        if (fPercent > fPercentLimit)
                        {
                            currentBudgetAvailable = false;
                            reasonNoBudget         = "Percent after spending greater than priority limit " + fPercent.ToString("f2") + "/" + fPercentLimit.ToString("f2") + " for year(" + currentYear + ")";
                            return(noBudgetAvailable);
                        }
                    }
                    catch (Exception e)
                    {
                        SimulationMessaging.AddMessage(new SimulationMessage("Error: Evaluating priority. " + e.Message));
                        throw e;
                    }
                }
                //To be true here, there must be money available for each year.
                if (currentBudgetAvailable)
                {
                    return(budgetCheck);
                }
            }
            return(noBudgetAvailable);
        }
Ejemplo n.º 5
0
        public void LoadBudgets()
        {
            string[] budgets = BudgetOrderString.Split(',');
            String   strBudget;

            for (int i = 0; i < budgets.Length; i++)
            {
                strBudget = budgets[i];
                m_listBudgetOrder.Add(strBudget);
            }

            String  strSelect = "SELECT YEAR_,BUDGETNAME,AMOUNT FROM " + cgOMS.Prefix + "YEARLYINVESTMENT WHERE SIMULATIONID='" + this.InvestmentID + "' ORDER BY YEAR_";
            DataSet ds        = null;

            try
            {
                ds = DBMgr.ExecuteQuery(strSelect);
            }
            catch (Exception ex)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Loading YEARLYINVESTMENT table." + ex.Message));
                return;
            }

            String strYear;

            String strAmount;

            MaximumYear = Int32.MinValue;

            foreach (DataRow row in ds.Tables[0].Rows)
            {
                strYear = row[0].ToString();
                var year = Convert.ToInt32(strYear);
                if (year > MaximumYear)
                {
                    MaximumYear = year;
                }
                strBudget = row[1].ToString();
                strAmount = row[2].ToString();

                if (BudgetYear.Contains(strBudget))
                {
                    Hashtable hashYearAmount         = (Hashtable)BudgetYear[strBudget];
                    Hashtable hashYearAmountOriginal = (Hashtable)BudgetYearOriginal[strBudget];

                    m_hashBudgetYear.Remove(strBudget);
                    m_hashBudgetYearOriginal.Remove(strBudget);

                    if (strAmount == "")
                    {
                        hashYearAmount.Add(strYear, 0.0);
                        hashYearAmountOriginal.Add(strYear, 0.0);
                    }
                    else
                    {
                        hashYearAmount.Add(strYear, float.Parse(strAmount));
                        hashYearAmountOriginal.Add(strYear, float.Parse(strAmount));
                    }

                    BudgetYear.Add(strBudget, hashYearAmount);
                    BudgetYearOriginal.Add(strBudget, hashYearAmountOriginal);
                }
                else
                {
                    Hashtable hashYearAmount         = new Hashtable();
                    Hashtable hashYearAmountOriginal = new Hashtable();

                    if (strAmount == "")
                    {
                        hashYearAmount.Add(strYear, 0.0);
                        hashYearAmountOriginal.Add(strYear, 0.0);
                    }
                    else
                    {
                        hashYearAmount.Add(strYear, float.Parse(strAmount));
                        hashYearAmountOriginal.Add(strYear, float.Parse(strAmount));
                    }



                    BudgetYear.Add(strBudget, hashYearAmount);
                    BudgetYearOriginal.Add(strBudget, hashYearAmountOriginal);
                }
            }

            foreach (var budget in BudgetYear.Keys)
            {
                var hashYearAmount         = (Hashtable)BudgetYear[budget];
                var hashYearAmountOriginal = (Hashtable)BudgetYearOriginal[budget];

                for (int year = MaximumYear + 1; year < MaximumYear + 101; year++)
                {
                    hashYearAmount.Add(year.ToString(), hashYearAmount[MaximumYear.ToString()]);
                    hashYearAmountOriginal.Add(year.ToString(), hashYearAmountOriginal[MaximumYear.ToString()]);
                }
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Check if budget can support treatment.  Checks for each priority.
        /// </summary>
        /// <param name="fAmount"></param>
        /// <param name="strBudget"></param>
        /// <param name="strYear"></param>
        /// <param name="hashAttributeValue"></param>
        /// <param name="priority"></param>
        /// <returns></returns>
        public string IsBudgetAvailable(float fAmount, String strBudget, String strYear, Hashtable hashAttributeValue, Priorities priority)
        {
            string[] budgets;
            try
            {
                budgets = strBudget.Split('|');
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Budget is null." + e.Message));
                throw e;
            }

            foreach (string budget in budgets)
            {
                string    budgetCheck = budget.Trim();
                Hashtable hashYearAmount;
                Hashtable hashYearAmountOriginal;
                float     fAvailable;
                float     fOriginal;
                float     fAfterSpending;
                float     fPercent;

                //Budget not defined
                try
                {
                    if (!BudgetYear.Contains(budgetCheck))
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking budget year. " + e.Message));
                    throw e;
                }


                try
                {
                    hashYearAmount = (Hashtable)BudgetYear[budgetCheck];
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year. " + e.Message));
                    throw e;
                }
                try
                {
                    if (!hashYearAmount.Contains(strYear))
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking year amount. " + e.Message));
                    throw e;
                }

                try
                {
                    fAvailable = (float)hashYearAmount[strYear];
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving year amount. " + e.Message));
                    throw e;
                }

                try
                {
                    if (!BudgetYearOriginal.Contains(budgetCheck))
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking budget year original. " + e.Message));
                    throw e;
                }

                try
                {
                    hashYearAmountOriginal = (Hashtable)BudgetYearOriginal[budgetCheck];
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year original. " + e.Message));
                    throw e;
                }


                try
                {
                    if (!hashYearAmountOriginal.Contains(strYear))
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking year amount original. " + e.Message));
                    throw e;
                }

                try
                {
                    fOriginal = (float)hashYearAmountOriginal[strYear];
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving year amount original. " + e.Message));
                    throw e;
                }

                fAfterSpending = fAvailable - fAmount;
                if (fOriginal <= 0)
                {
                    continue;
                }
                fPercent = (1 - fAfterSpending / fOriginal) * 100;

                try
                {
                    if (priority.IsAllSections)
                    {
                        float fPercentLimit = (float)priority.BudgetPercent[budgetCheck];
                        if (fPercent < fPercentLimit)
                        {
                            return(budgetCheck);
                        }
                    }
                    else
                    {
                        if (priority.Criteria.IsCriteriaMet(hashAttributeValue))
                        {
                            float fPercentLimit = (float)priority.BudgetPercent[budgetCheck];
                            if (fPercent < fPercentLimit)
                            {
                                return(budgetCheck);
                            }
                        }
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year original. " + e.Message));
                    throw e;
                }
            }

            return(null);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Check if budget can support treatment.  Checks for each priority.
        /// </summary>
        /// <param name="fAmount"></param>
        /// <param name="strBudget"></param>
        /// <param name="strYear"></param>
        /// <param name="hashAttributeValue"></param>
        /// <param name="priority"></param>
        /// <returns></returns>
        public string IsBudgetAvailable(float fAmount, String strBudget, String strYear, Hashtable hashAttributeValue, Priorities priority)
        {
            string[] possibleBudgets;
            try
            {
                possibleBudgets = strBudget.Split('|');
            }
            catch (Exception e)
            {
                SimulationMessaging.AddMessage(new SimulationMessage("Error: Budget is null." + e.Message));
                throw e;
            }

            //If there are no budget criteria, then ignore.  The list is enforced.

            var budgets = new List <string>();

            if (SimulationMessaging.BudgetCriterias.Count > 0)
            {
                var listAvailableBudget = new List <BudgetCriteria>();
                foreach (var budgetCriteria in SimulationMessaging.BudgetCriterias)
                {
                    if (budgetCriteria.Criteria.IsCriteriaMet(hashAttributeValue))
                    {
                        listAvailableBudget.Add(budgetCriteria);
                    }
                }


                foreach (var budget in possibleBudgets)
                {
                    var available = listAvailableBudget.Find(b => b.BudgetName == budget);
                    if (available != null && !budgets.Contains(available.BudgetName))
                    {
                        budgets.Add(available.BudgetName);
                    }
                }
            }
            else
            {
                foreach (var budget in possibleBudgets)
                {
                    budgets.Add(budget);
                }
            }



            foreach (string budget in budgets)
            {
                string    budgetCheck = budget.Trim();
                Hashtable hashYearAmount;
                Hashtable hashYearAmountOriginal;
                float     fAvailable;
                float     fOriginal;
                float     fAfterSpending;
                float     fPercent;

                //Budget not defined
                try
                {
                    if (!BudgetYear.Contains(budgetCheck))
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking budget year. " + e.Message));
                    throw e;
                }


                try
                {
                    hashYearAmount = (Hashtable)BudgetYear[budgetCheck];
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year. " + e.Message));
                    throw e;
                }
                try
                {
                    if (!hashYearAmount.Contains(strYear))
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking year amount. " + e.Message));
                    throw e;
                }

                try
                {
                    fAvailable = (float)hashYearAmount[strYear];
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving year amount. " + e.Message));
                    throw e;
                }

                try
                {
                    if (!BudgetYearOriginal.Contains(budgetCheck))
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking budget year original. " + e.Message));
                    throw e;
                }

                try
                {
                    hashYearAmountOriginal = (Hashtable)BudgetYearOriginal[budgetCheck];
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year original. " + e.Message));
                    throw e;
                }


                try
                {
                    if (!hashYearAmountOriginal.Contains(strYear))
                    {
                        continue;
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Checking year amount original. " + e.Message));
                    throw e;
                }

                try
                {
                    fOriginal = (float)hashYearAmountOriginal[strYear];
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving year amount original. " + e.Message));
                    throw e;
                }

                fAfterSpending = fAvailable - fAmount;
                if (fOriginal <= 0)
                {
                    continue;
                }
                fPercent = (1 - fAfterSpending / fOriginal) * 100;

                try
                {
                    if (priority.IsAllSections)
                    {
                        float fPercentLimit = (float)priority.BudgetPercent[budgetCheck];
                        if (fPercent < fPercentLimit)
                        {
                            return(budgetCheck);
                        }
                    }
                    else
                    {
                        if (priority.Criteria.IsCriteriaMet(hashAttributeValue))
                        {
                            float fPercentLimit = (float)priority.BudgetPercent[budgetCheck];
                            if (fPercent < fPercentLimit)
                            {
                                return(budgetCheck);
                            }
                        }
                    }
                }
                catch (Exception e)
                {
                    SimulationMessaging.AddMessage(new SimulationMessage("Error: Retrieving budget year original. " + e.Message));
                    throw e;
                }
            }

            return(null);
        }