public BudgetMonth(BudgetMonth budgetMonth) { Month = budgetMonth.Month; Year = budgetMonth.Year; BudgetReal = new BudgetReal(budgetMonth.BudgetReal); BudgetPlanned = new BudgetPlanned(budgetMonth.BudgetPlanned); }
public static BudgetMonth Create(List <BudgetCategoryTemplate> categories, DateTime date) { var month = new BudgetMonth(); month.SetupCategories(categories); month.SetupDate(date); return(month); }
public BudgetMonth GetMonth(DateTime date) { var month = _months.Find(x => x.Month == date.Month && x.Year == date.Year); if (month == null) { month = BudgetMonth.Create(BudgetDescription.Categories, date); month.onBudgetPlannedChanged += OnPlannedBudgetChanged; month.UpdatePlannedBudget(budgetPlanned); month.Setup(); _months.Add(month); //?? //Save(); } return(month); }