Example #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            ExpenseAdd expenseAddForm = new ExpenseAdd();

            openChildForm(expenseAddForm);
            //pnlButtons.Hide();
        }
        /// <summary>
        ///  Handles the save and back button being pressed on the <see cref="Views.ExpenseAdd"/> form
        /// </summary>
        /// <param name="sender">The sender object</param>
        /// <param name="e">Event arguments</param>
        public static void AddSaveAndBack(object sender, EventArgs e)
        {
            var success = SaveAddExpense();

            if (success)
            {
                ExpenseAdd.Owner.Show();
                ExpenseAdd.Close();
            }
        }
        /// <summary>
        /// Handles navigating to <see cref="Views.ExpenseAdd"/>
        /// </summary>
        /// <param name="sender">The sender object</param>
        /// <param name="e">Event arguments</param>
        public static void AddButtonClicked(object sender, EventArgs e)
        {
            if (ExpenseAdd == null)
            {
                ExpenseAdd             = new ExpenseAdd();
                ExpenseAdd.FormClosed += ExpenseAddViewOnFormClosed;
            }

            ExpenseAdd.Show(ExpenseView);
            ExpenseView.Hide();
        }
 /// <summary>
 ///  Handles the cancel button being pressed on the <see cref="Views.ExpenseAdd"/> form
 /// </summary>
 /// <param name="sender">The sender object</param>
 /// <param name="e">Event arguments</param>
 public static void ExpenseCancelClick(object sender, EventArgs e)
 {
     ExpenseAdd.Owner.Show();
     ExpenseAdd.Close();
 }