private void btnEdit_Click(object sender, EventArgs e) { if (supplierDetailsBindingSource.Current == null) { return; } using (AddSupplier am = new AddSupplier(supplierDetailsBindingSource.Current as Supplier_Details)) { if (am.ShowDialog() == DialogResult.OK) { supplierDetailsBindingSource.DataSource = cmd.Supplier_Details.ToList(); } } }
private void btnAdd_Click(object sender, EventArgs e) { AddSupplier a = new AddSupplier(null); a.Visible = true; }