private void EditPlanButton_Click(object sender, EventArgs e) { NC_CreateDayPlan form = new NC_CreateDayPlan(AvailablePlans[int.Parse(dayPlanListBox.SelectedValue.ToString())], AvailableFood, AvailableRecipes); if (form.ShowDialog(this) != DialogResult.OK && form.updateData) { UpdateData(); } form.Dispose(); }
private void AddPlanButton_Click_1(object sender, EventArgs e) { NC_CreateDayPlan form = new NC_CreateDayPlan(new PlanModel(), AvailableFood, AvailableRecipes); if (form.ShowDialog(this) != DialogResult.OK && form.updateData) { UpdateData(); } form.Dispose(); }