Пример #1
0
        /// <summary>
        /// Opens an EditSelection form and passes the the budget object and a string indicating that the type is Vendor.
        /// </summary>
        private void btnVendorManager_Click(object sender, EventArgs e)
        {
            EditSelection oForm = new EditSelection(_budget, "Vendor");

            oForm.StartPosition = FormStartPosition.CenterParent;
            oForm.ShowDialog();  //Using showdialog so that the calling form pauses while the AccountManager is open.
            oForm = null;

            _budget.ReLoadComboBox(cmbxVendor, "Vendor");
        }
Пример #2
0
        /// <summary>
        /// Opens an EditSelection form and passes the the budget object and a string indicating that the type is Category.
        /// </summary>
        private void btnCategoryManager_Click(object sender, EventArgs e)
        {
            EditSelection oForm = new EditSelection(_budget, "Category");

            oForm.StartPosition = FormStartPosition.CenterParent;
            oForm.ShowDialog();  //Using showdialog so that the calling form pauses while the AccountManager is open.
            oForm = null;

            //replace this with a method that loads a single combobox
            _budget.ReLoadComboBox(cmbxCategory, "Category");
        }
Пример #3
0
        /// <summary>
        /// Opens the Vendor Manager.
        /// </summary>
        private void vendorManagerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (budget != null)
            {
                EditSelection oForm = new EditSelection(budget, "Vendor");
                oForm.StartPosition = FormStartPosition.CenterParent;
                oForm.ShowDialog();  //Using showdialog so that the main form pauses while the AccountManager is open.
                oForm = null;

                FillDGVS();
            }
            else
            {
                PleaseCreateOrLoadBudget();
            }
        }