private void addDishButton_Click(object sender, EventArgs e) { DishForm form = new DishForm(); form.ShowDialog(); currentDishesList = null; RefreshListBoxWithDishes(); }
private void editDishButton_Click(object sender, EventArgs e) { if (ListBox.SelectedIndex != -1) { DishForm form = new DishForm(GetSelectedDish()); form.ShowDialog(); currentDishesList = null; RefreshListBoxWithDishes(); } }