示例#1
0
        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";
        }
示例#2
0
        public BudgetPage()
        {
            InitializeComponent();

            date.MaximumDate = DateTime.Now;

            string s = ExpenseItemUtil.convertEListToString(xlist);

            app.StreList = s;
            displayExpenseList(xlist);
        }
示例#3
0
 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);
 }