예제 #1
0
 private void tsbBalance_Click(object sender, EventArgs e)
 {
     AccountCorrectionForm form = new AccountCorrectionForm(account);
     if (form.ShowDialog() == DialogResult.OK)
     {
         DialogResult = DialogResult.OK;
         this.Close();
     }
 }
예제 #2
0
        private void tsbBalance_Click(object sender, EventArgs e)
        {
            AccountCorrectionForm form = new AccountCorrectionForm(account);

            if (form.ShowDialog() == DialogResult.OK)
            {
                DialogResult = DialogResult.OK;
                this.Close();
            }
        }
예제 #3
0
        private void tsmiNewAccount_Click(object sender, EventArgs e)
        {
            AccountEditForm form = new AccountEditForm((sender as ToolStripMenuItem).Equals(tsmiNewDebitAccount));

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                AccountCorrectionForm initialBalanceForm = new AccountCorrectionForm(form.UpdatedAccount);
                initialBalanceForm.ShowDialog(this);
                refreshForm();
            }
        }
예제 #4
0
        private void tsmiAccountBalanceCorrection_Click(object sender, EventArgs e)
        {
            MoneyDataSet.AccountsRow selected = dgvSearchResults.CurrentRow.Tag as MoneyDataSet.AccountsRow;
            AccountCorrectionForm    form     = new AccountCorrectionForm(selected);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                updateTagCloud();
                dgvSearchResults.CurrentRow.Cells[2].Value = selected.EntryTime;
                dgvSearchResults.CurrentRow.Cells[3].Value = selected.Balance.ToString(Consts.UI.CurrencyFormat,
                                                                                       selected.CurrenciesRow.CurrencyCultureInfo);
            }
        }
예제 #5
0
        /// <summary>
        /// Show account correction form
        /// </summary>
        private void tsmiAccountCorrection_Click(object sender, EventArgs e)
        {
            if (!keeper.Accounts.Any())
            {
                MessageBox.Show(Resources.Labels.NoAccountsText, Resources.Labels.NoAccountsTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
                AccountListForm accountsForm = new AccountListForm();
                accountsForm.ShowDialog();
                refreshForm();
                return;
            }

            AccountCorrectionForm form = new AccountCorrectionForm();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                refreshForm();
            }
        }
예제 #6
0
        private void tsbNewAccount_Click(object sender, EventArgs e)
        {
            AccountEditForm form = new AccountEditForm((sender as ToolStripButton).Equals(tsbNewDebitAccount));

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                AccountCorrectionForm initialBalanceForm = new AccountCorrectionForm(form.UpdatedAccount);
                initialBalanceForm.ShowDialog(this);
                refreshAccounts();
                foreach (DataGridViewRow row in dgvAccounts.Rows)
                {
                    if (row.Tag == form.UpdatedAccount)
                    {
                        dgvAccounts.FirstDisplayedCell = dgvAccounts.CurrentCell = row.Cells[0];
                        break;
                    }
                }
            }
        }
예제 #7
0
 private void tsbBalance_Click(object sender, EventArgs e)
 {
     if (dgvAccounts.SelectedRows.Count == 1)
     {
         MoneyDataSet.AccountsRow account = dgvAccounts.SelectedRows[0].Tag as MoneyDataSet.AccountsRow;
         AccountCorrectionForm    form    = new AccountCorrectionForm(account);
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             refreshAccounts();
             foreach (DataGridViewRow row in dgvAccounts.Rows)
             {
                 if (row.Tag == form.UpdatedAccount)
                 {
                     dgvAccounts.FirstDisplayedCell = dgvAccounts.CurrentCell = row.Cells[0];
                     break;
                 }
             }
         }
     }
 }
예제 #8
0
 private void tsmiAccountBalanceCorrection_Click(object sender, EventArgs e)
 {
     MoneyDataSet.AccountsRow selected = dgvSearchResults.CurrentRow.Tag as MoneyDataSet.AccountsRow;
     AccountCorrectionForm form = new AccountCorrectionForm(selected);
     if (form.ShowDialog(this) == DialogResult.OK)
     {
         updateTagCloud();
         dgvSearchResults.CurrentRow.Cells[2].Value = selected.EntryTime;
         dgvSearchResults.CurrentRow.Cells[3].Value = selected.Balance.ToString(Consts.UI.CurrencyFormat,
             selected.CurrenciesRow.CurrencyCultureInfo);
     }
 }
예제 #9
0
 private void tsmiNewAccount_Click(object sender, EventArgs e)
 {
     AccountEditForm form = new AccountEditForm((sender as ToolStripMenuItem).Equals(tsmiNewDebitAccount));
     if (form.ShowDialog(this) == DialogResult.OK)
     {
         AccountCorrectionForm initialBalanceForm = new AccountCorrectionForm(form.UpdatedAccount);
         initialBalanceForm.ShowDialog(this);
         refreshForm();
     }
 }
예제 #10
0
        /// <summary>
        /// Show account correction form
        /// </summary>
        private void tsmiAccountCorrection_Click(object sender, EventArgs e)
        {
            if (!keeper.Accounts.Any())
            {
                MessageBox.Show(Resources.Labels.NoAccountsText, Resources.Labels.NoAccountsTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
                AccountListForm accountsForm = new AccountListForm();
                accountsForm.ShowDialog();
                refreshForm();
                return;
            }

            AccountCorrectionForm form = new AccountCorrectionForm();
            if (form.ShowDialog(this) == DialogResult.OK)
            {
                refreshForm();
            }
        }
예제 #11
0
 private void tsbNewAccount_Click(object sender, EventArgs e)
 {
     AccountEditForm form = new AccountEditForm((sender as ToolStripButton).Equals(tsbNewDebitAccount));
     if (form.ShowDialog(this) == DialogResult.OK)
     {
         AccountCorrectionForm initialBalanceForm = new AccountCorrectionForm(form.UpdatedAccount);
         initialBalanceForm.ShowDialog(this);
         refreshAccounts();
         foreach (DataGridViewRow row in dgvAccounts.Rows)
         {
             if (row.Tag == form.UpdatedAccount)
             {
                 dgvAccounts.FirstDisplayedCell = dgvAccounts.CurrentCell = row.Cells[0];
                 break;
             }
         }
     }
 }
예제 #12
0
 private void tsbBalance_Click(object sender, EventArgs e)
 {
     if (dgvAccounts.SelectedRows.Count == 1)
     {
         MoneyDataSet.AccountsRow account = dgvAccounts.SelectedRows[0].Tag as MoneyDataSet.AccountsRow;
         AccountCorrectionForm form = new AccountCorrectionForm(account);
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             refreshAccounts();
             foreach (DataGridViewRow row in dgvAccounts.Rows)
             {
                 if (row.Tag == form.UpdatedAccount)
                 {
                     dgvAccounts.FirstDisplayedCell = dgvAccounts.CurrentCell = row.Cells[0];
                     break;
                 }
             }
         }
     }
 }
예제 #13
0
 private void btnNewAccount_Click(object sender, EventArgs e)
 {
     AccountEditForm form = new AccountEditForm((sender as Button).Equals(btnNewDebitAccount));
     if (form.ShowDialog(this) == DialogResult.OK)
     {
         AccountCorrectionForm initialBalanceForm = new AccountCorrectionForm(form.UpdatedAccount);
         initialBalanceForm.ShowDialog(this);
         refreshAccountsListBox();
         updateWelcomeTab();
         updateTransactionsTab();
         updateTagCloud();
         lbAccounts.SelectedItem = form.UpdatedAccount;
     }
 }
예제 #14
0
 private void btnAccountBalance_Click(object sender, EventArgs e)
 {
     MoneyDataSet.AccountsRow selected = lbAccounts.SelectedItem as MoneyDataSet.AccountsRow;
     AccountCorrectionForm form = new AccountCorrectionForm(selected);
     if (form.ShowDialog(this) == DialogResult.OK)
     {
         updateTransactionsTab();
         updateWelcomeTab();
         updateAccountsTab();
         lbAccounts.SelectedItem = form.UpdatedAccount;
     }
 }
예제 #15
0
        /// <summary>
        /// Show account correction form
        /// </summary>
        private void tsmiAccountCorrection_Click(object sender, EventArgs e)
        {
            if (!keeper.Accounts.Any())
            {
                MessageBox.Show(Resources.Labels.NoAccountsText, Resources.Labels.NoAccountsTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
                tabsMain.SelectedTab = tabAccounts;
                return;
            }

            AccountCorrectionForm form = new AccountCorrectionForm();
            if (form.ShowDialog(this) == DialogResult.OK)
            {
                updateWelcomeTab();
                updateTransactionsTab();
                updateAccountsTab();
            }
        }