private void Initialize() { listBoxTypes.Items.Clear(); foreach (var type in DishPresenter.GetAllType()) { listBoxTypes.Items.Add(type); } }
public FormAddDish() { InitializeComponent(); comboBoxTypeDish.DataSource = DishPresenter.GetAllType(); while (true) { if (DishPresenter.GetDishes().Exists(x => x.Id == id)) { id++; } else { break; } } }