Exemplo n.º 1
0
        private void mnuSupliersAdd_Click(object sender, EventArgs e)
        {
            // show AddSupplier form
            AddSupplier fAddSupplier = new AddSupplier();

            fAddSupplier.ShowDialog();
        }
Exemplo n.º 2
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            AddSupplier fAddSupplier = new AddSupplier();     //Initialized AddSupplier form

            if (fAddSupplier.ShowDialog() == DialogResult.OK) // show AddSupplier form and if success
            {
                //get newly add supplier form AddSupplier form and add to list
                suppliers.Add(fAddSupplier.GetNewSupplier());
                SupplierToListViewItem(lstSuppliers, fAddSupplier.GetNewSupplier());
            }
        }