Esempio n. 1
0
 // -------------------------------------------------------------------
 // Opens the Edit Transaction form when the button on the main form is clicked
 // -------------------------------------------------------------------
 private void bEditTransaction_Click(object sender, EventArgs e)
 {
     if (lbTransactionHistory.SelectedIndex != -1)
     {
         int index = lbTransactionHistory.SelectedIndex;
         //The naming got screwed up somewhere, this is calling the Edit Transaction form
         originalTransactionDate editMe = new originalTransactionDate(recentHistory, index, currentUser, commandHandler);
         editMe.Show();
         editMe.VisibleChanged += EditMe_VisibleChanged;
     }
 }
Esempio n. 2
0
        // -------------------------------------------------------------------
        // Updates the main form with the changes made in the Edit Transaction form
        // -------------------------------------------------------------------
        private void EditMe_VisibleChanged(object sender, EventArgs e)
        {
            originalTransactionDate editTransaction = (originalTransactionDate)sender;

            if (!editTransaction.Visible)
            {
                recentHistory.clear();
                lbTransactionHistory.Items.Clear();
                updateUserAmounts();
                clearCategories();
                loadCategories();
                loadTransactions();
            }
        }