//--------------------------------------------------------------------------------------------------------- /// <summary> /// Получение стоимости всех мероприятий по уровням бюджета /// </summary> /// <param name="budget_financing">Уровень бюджета</param> /// <returns>Стоимость мероприятий</returns> //--------------------------------------------------------------------------------------------------------- public virtual String GetFinanceFromBudget(TBudgetFinancingSet budget_financing) { //Decimal total = 0; //for (Int32 i = 0; i < mEntities.Count; i++) //{ // total += mEntities[i].GetBudgetFinancingOfSet(budget_financing); //} //return ((total / 1000).ToString("N3", CultureInfo.CurrentCulture)); return(""); }
//--------------------------------------------------------------------------------------------------------- /// <summary> /// Получение совокупного финансирования по уровням бюджета /// </summary> /// <param name="this">Интерфейс для определения финансирования по уровням бюджета</param> /// <param name="budget_financing">Набор уровней бюджета</param> /// <returns>Совокупное финансирование</returns> //--------------------------------------------------------------------------------------------------------- public static Decimal GetBudgetFinancingOfSet(this ICubeXBudgetFinancing @this, TBudgetFinancingSet budget_financing) { Decimal total = 0; if (budget_financing.IsFlagSet(TBudgetFinancingSet.Local)) { total += @this.PriceLocal; } if (budget_financing.IsFlagSet(TBudgetFinancingSet.Regional)) { total += @this.PriceRegional; } if (budget_financing.IsFlagSet(TBudgetFinancingSet.Federal)) { total += @this.PriceFederal; } if (budget_financing.IsFlagSet(TBudgetFinancingSet.Extra)) { total += @this.PriceExtra; } return(total); }
//--------------------------------------------------------------------------------------------------------- /// <summary> /// Получение стоимости всех мероприятий указанной программы, года и уровней бюджета /// </summary> /// <param name="program_name">Наименование подпрограммы</param> /// <param name="year">Год</param> /// <param name="budget_financing">Уровень бюджета</param> /// <returns>Стоимость мероприятий</returns> //--------------------------------------------------------------------------------------------------------- public virtual String GetFinanceFromProgramAndYear(String program_name, Int32 year, TBudgetFinancingSet budget_financing) { //Decimal total = 0; //for (Int32 i = 0; i < mEntities.Count; i++) //{ // if (mEntities[i].SubProgramName == program_name && mEntities[i].YearExecution == year) // { // total += mEntities[i].GetBudgetFinancingOfSet(budget_financing); // } //} //return ((total / 1000).ToString("N3", CultureInfo.CurrentCulture)); return(""); }