private void manageSuppliersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var supplierlist = new ManageSupplierListing
            {
                MdiParent = this
            };

            supplierlist.Show();
        }
Example #2
0
 //Using same window form for Add Edit. Titles will be different depending on if it was add or edit
 public AddEditSupplier(ManageSupplierListing manageSupplierListing = null)
 {
     InitializeComponent();
     lblSupTitle.Text       = "Add New Supplier";
     this.Text              = "Add New Supplier";
     isEditMode             = false;
     _manageSupplierListing = manageSupplierListing;
     _db = new TravelExpertsEntities();
 }
Example #3
0
        public AddEditSupplier(Supplier supplierToEdit, ManageSupplierListing manageSupplierListing = null)
        {
            InitializeComponent();
            lblSupTitle.Text       = "Edit Suppliers";
            this.Text              = "Edit Suppliers";
            _manageSupplierListing = manageSupplierListing;

            if (supplierToEdit == null)
            {
                MessageBox.Show("Please ensure you selected a valid Supplier to edit");
                Close();
            }
            else
            {
                isEditMode = true;
                _db        = new TravelExpertsEntities();
                PopulateFields(supplierToEdit);
            }
        }