private void Mg_cust_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { using (EntryCustomer frm = new EntryCustomer(customerBindingSource.Current as Customer)) { if (frm.ShowDialog() == DialogResult.OK) { customerBindingSource.DataSource = db.Customers.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; } }