public New_Capital(Capital originalCapital) { InitializeComponent(); this.editing = true; this.originalCapital = originalCapital; textBox1.Text = originalCapital.name; }
public Account(string name) { this.name = name; planList = new List <BudgetPlan>(); budgetList = new List <Budget>(); budgetTotal = new Budget("Total Expenses"); budgetList.Add(budgetTotal); defaultBudget = new Budget("Default"); budgetList.Add(defaultBudget); capitalList = new List <Capital>(); defaultCapital = new Capital("Total"); capitalList.Add(defaultCapital); }
public static Capital totalCapital(Capital capital) { decimal tmp = 0; for (int i = 1; i < getActiveCList().Count; i++) { tmp += getActiveCList().ElementAt(i).balance; } tmp = getActiveCList().ElementAt(0).balance - tmp; for (int i = 1; i < getActiveCList().Count; i++) { if (getActiveCList().ElementAt(i) != capital) { tmp += getActiveCList().ElementAt(i).balance; } } total_Capital = tmp; accounts.ElementAt(activeAccount).capitalList.ElementAt(0).balance = total_Capital; return(null); }