private void tsbBalance_Click(object sender, EventArgs e) { AccountCorrectionForm form = new AccountCorrectionForm(account); if (form.ShowDialog() == DialogResult.OK) { DialogResult = DialogResult.OK; this.Close(); } }
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(); } }
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); } }
/// <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(); } }
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; } } } }
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; } } } } }
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; } }
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; } }
/// <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(); } }