private void AddEntity(int chosenTable) { try { switch (chosenTable) { case 1: userMenu.Add(); break; case 2: supplierMenu.Add(); break; case 3: suppToProdtMenu.Add(); break; case 4: roleMenu.Add(); break; case 5: productMenu.Add(); break; case 6: orderToProductMenu.Add(); break; case 7: orderMenu.Add(); break; } } catch (Exception ex) { Console.WriteLine("Error, malinformed values."); Console.WriteLine("Press 'Enter' to continue"); Console.ReadKey(); return; } Console.WriteLine("Press 'Enter' to continue"); Console.WriteLine("done"); Console.ReadKey(); }
public void AddUserMenu(MenuItem menu) { UserMenu.Add(menu); UserMenu = UserMenu.OrderBy(x => x.SortOrder).ToList(); }