Exemplo n.º 1
0
        private void tsmiSubmitPlanTransaction_Click(object sender, EventArgs e)
        {
            TransactionEditForm form = new TransactionEditForm(
                (dgvSearchResults.CurrentRow.Tag as MoneyDataSet.PlannedTransactionsRow).TransactionTemplatesRow,
                dgvSearchResults.CurrentRow.Tag as MoneyDataSet.PlannedTransactionsRow);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                updateTagCloud();
            }
        }
Exemplo n.º 2
0
        private void tsbImplement_Click(object sender, EventArgs e)
        {
            TransactionEditForm form =
                new TransactionEditForm(sourcePlan.TransactionTemplatesRow, sourcePlan);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// New transaction based on template menu item click
        /// </summary>
        private void tsmiTransactionFromTemplate_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem   item = sender as ToolStripMenuItem;
            TransactionEditForm form = new TransactionEditForm(item.Tag as MoneyDataSet.TransactionTemplatesRow);

            if (form.PreCheck())
            {
                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    refreshForm();
                }
            }
        }
Exemplo n.º 4
0
        private void tsbImplement_Click(object sender, EventArgs e)
        {
            if (dgvPlans.SelectedRows.Count == 1)
            {
                MoneyDataSet.PlannedTransactionsRow plan = dgvPlans.SelectedRows[0].Tag as MoneyDataSet.PlannedTransactionsRow;

                TransactionEditForm form = new TransactionEditForm(plan.TransactionTemplatesRow, plan);

                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    refreshPlans();

                    foreach (DataGridViewRow row in dgvPlans.Rows)
                    {
                        if (row.Tag == plan)
                        {
                            dgvPlans.FirstDisplayedCell = dgvPlans.CurrentCell = row.Cells[0];
                            break;
                        }
                    }
                }
            }
        }
Exemplo n.º 5
0
        private void tsbImplement_Click(object sender, EventArgs e)
        {
            TransactionEditForm form =
                new TransactionEditForm(sourcePlan.TransactionTemplatesRow, sourcePlan);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
Exemplo n.º 6
0
        private void tsmiSubmitPlanTransaction_Click(object sender, EventArgs e)
        {
            TransactionEditForm form = new TransactionEditForm(
                (dgvSearchResults.CurrentRow.Tag as MoneyDataSet.PlannedTransactionsRow).TransactionTemplatesRow,
                dgvSearchResults.CurrentRow.Tag as MoneyDataSet.PlannedTransactionsRow);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                updateTagCloud();
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// New transaction based on template menu item click
 /// </summary>
 private void tsmiTransactionFromTemplate_Click(object sender, EventArgs e)
 {
     ToolStripMenuItem item = sender as ToolStripMenuItem;
     TransactionEditForm form = new TransactionEditForm(item.Tag as MoneyDataSet.TransactionTemplatesRow);
     if (form.PreCheck())
     {
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             refreshForm();
         }
     }
 }
Exemplo n.º 8
0
        private void tsbImplement_Click(object sender, EventArgs e)
        {
            if (dgvPlans.SelectedRows.Count == 1)
            {
                MoneyDataSet.PlannedTransactionsRow plan = dgvPlans.SelectedRows[0].Tag as MoneyDataSet.PlannedTransactionsRow;

                TransactionEditForm form = new TransactionEditForm(plan.TransactionTemplatesRow, plan);

                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    refreshPlans();

                    foreach (DataGridViewRow row in dgvPlans.Rows)
                    {
                        if (row.Tag == plan)
                        {
                            dgvPlans.FirstDisplayedCell = dgvPlans.CurrentCell = row.Cells[0];
                            break;
                        }
                    }
                }
            }
        }
Exemplo n.º 9
0
 private void btnPlannedTransactionImplement_Click(object sender, EventArgs e)
 {
     if (lbPlannedTransactions.SelectedItem != null)
     {
         TransactionEditForm form = new TransactionEditForm(
             (lbPlannedTransactions.SelectedItem as MoneyDataSet.PlannedTransactionsRow).TransactionTemplatesRow,
             lbPlannedTransactions.SelectedItem as MoneyDataSet.PlannedTransactionsRow);
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             updateWelcomeTab();
             updateTransactionsTab();
             updatePlannedTransactionsTab();
             updateAccountsTab();
             updateTagCloud();
             lbTransactions.SelectedItem = form.UpdatedTransaction;
             tabsMain.SelectedTab = tabTransactions;
         }
     }
 }
Exemplo n.º 10
0
 private void btnAddTransaction_Click(object sender, EventArgs e)
 {
     TemplateSelectorForm selector = new TemplateSelectorForm(keeper.GetTransactionTemplates((sender as Button).Equals(btnAddIncomeTransaction)));
     if (selector.ShowDialog(this) == DialogResult.OK)
     {
         TransactionEditForm form = new TransactionEditForm(selector.SelectedTemplate);
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             updateWelcomeTab();
             updateTransactionsTab();
             updatePlannedTransactionsTab();
             updateTagCloud();
             lbTransactions.SelectedItem = form.UpdatedTransaction;
         }
     }
 }
Exemplo n.º 11
0
 /// <summary>
 /// New transaction based on template menu item click
 /// </summary>
 private void tsmiTransactionFromTemplate_Click(object sender, EventArgs e)
 {
     ToolStripMenuItem item = sender as ToolStripMenuItem;
     TransactionEditForm form = new TransactionEditForm(item.Tag as MoneyDataSet.TransactionTemplatesRow);
     if (form.PreCheck())
     {
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             updateWelcomeTab();
             updateTransactionsTab();
             updatePlannedTransactionsTab();
             updateAccountsTab();
             updateTagCloud();
         }
     }
 }