public void ShowOrderForm(UserAccount user, Guid orderId, InventoryItem inventoryItem, LoginForm loginForm) { foreach (Form form in Application.OpenForms) { if (String.Compare(form.Name, "OrderForm") == 0) { form.Show(); return; } } orderForm = new OrderForm(user, orderId, inventoryItem, loginForm); orderForm.Show(); }
public void ShowOrderForm(UserAccount user,LoginForm loginForm, Customer customer) { foreach (Form form in Application.OpenForms) { if (String.Compare(form.Name, "OrderForm") == 0) { form.Show(); return; } } orderForm = new OrderForm(user, loginForm, customer); orderForm.Show(); }