Esempio n. 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();
     }
 }
Esempio n. 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();
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 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;
                    }
                }
            }
        }
Esempio n. 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;
                 }
             }
         }
     }
 }
Esempio n. 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);
     }
 }
Esempio n. 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();
     }
 }
Esempio n. 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();
            }
        }
Esempio n. 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;
             }
         }
     }
 }
Esempio n. 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;
                 }
             }
         }
     }
 }
Esempio n. 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;
     }
 }
Esempio n. 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;
     }
 }
Esempio n. 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();
            }
        }