private void btnDetails_Click(object sender, EventArgs e) { var selectedsupplier = (Supplier)cbSuppliers.SelectedItem; var f = new SupplierDetails(selectedsupplier, true); f.ShowDialog(); }
private void Details_Click(object sender, EventArgs e) { switch (_userchoice) { case "Employees": var selectedEmployee = (Employee)lbObjects.SelectedItem; var ed = new EmployeeDetails(selectedEmployee); ed.ShowDialog(); break; case "Stock": var selectedProduct = (Product)lbObjects.SelectedItem; var sd = new StockDetails(selectedProduct); sd.ShowDialog(); break; case "Customers": var selectedCustomer = (Customer)lbObjects.SelectedItem; var cd = new CustomerDetails(selectedCustomer); cd.ShowDialog(); break; case "Suppliers": var selectedSupplier = (Supplier)lbObjects.SelectedItem; var supd = new SupplierDetails(selectedSupplier); supd.ShowDialog(); break; case "Categories": var selectedCategory = (Category)lbObjects.SelectedItem; var catd = new CategorieDetails(selectedCategory); catd.ShowDialog(); break; case "Customer Orders": break; case "Supplier Orders": break; } }
private void btnNew_Click(object sender, EventArgs e) { switch (_userchoice) { case "Employees": var ed = new EmployeeDetails(); ed.ShowDialog(); break; case "Stock": var sd = new StockDetails(); sd.ShowDialog(); break; case "Customers": var cd = new CustomerDetails(); cd.ShowDialog(); break; case "Suppliers": var supd = new SupplierDetails(); supd.ShowDialog(); break; case "Categories": var catd = new CategorieDetails(); catd.ShowDialog(); break; case "Customer Orders": var cod = new CustomerOrdersOverview(_loggedInEmployee); cod.ShowDialog(); break; case "Supplier Orders": var sod = new SupplierOrdersOverview(_loggedInEmployee); sod.ShowDialog(); break; } }