void OnAddAmtClicked(object sender, EventArgs e) { double temp = Convert.ToDouble(amount.Text); if (temp > 0) { if (day != 0 && month != 0 && year != 0 && expTitle != null) { ExpenseList addNewExp = new ExpenseList(); addNewExp.day = day; addNewExp.month = month; addNewExp.year = year; addNewExp.expenseDesc = expTitle; addNewExp.amount = Convert.ToDouble(amount.Text); ExpenseItemUtil.addExpenseItem(xlist, addNewExp); displayExpenseList(xlist); string s = ExpenseItemUtil.convertEListToString(xlist); app.StreList = s; } } amount.Text = "0"; }
public BudgetPage() { InitializeComponent(); date.MaximumDate = DateTime.Now; string s = ExpenseItemUtil.convertEListToString(xlist); app.StreList = s; displayExpenseList(xlist); }
void OnMonthSelected(object sender, EventArgs e) { monthSelected = month.SelectedIndex + 1; displayStack.Children.Clear(); if (app.StreList == null) { xlist = ExpenseItemUtil.getExpenseDetail(); app.StreList = ExpenseItemUtil.convertEListToString(xlist); } else { xlist = ExpenseItemUtil.convertStringToEList(app.StreList); } displayExpenseList(xlist, monthSelected, yearSelected); }