private void mnuSupliersAdd_Click(object sender, EventArgs e) { // show AddSupplier form AddSupplier fAddSupplier = new AddSupplier(); fAddSupplier.ShowDialog(); }
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()); } }