private void Mg_supplier_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { using (EntrySupplier frm = new EntrySupplier(supplierBindingSource.Current as Supplier)) { if (frm.ShowDialog() == DialogResult.OK) { supplierBindingSource.DataSource = db.Suppliers.ToList(); } } }
private void BtnAdd_Click(object sender, EventArgs e) { switch (currentView) { case "articles": EntryArticle artForm = new EntryArticle(null); artForm.Show(); break; case "customers": EntryCustomer custFrom = new EntryCustomer(null); custFrom.Show(); break; case "suppliers": EntrySupplier supForm = new EntrySupplier(null); supForm.Show(); break; } }