private void showPlantEdit() { PlantAddEdit plantEditForm = new PlantAddEdit(geselecteerdePlant); plantEditForm.ShowDialog(); if (plantEditForm.DialogResult == DialogResult.OK) { refreshView(); } }
private void plantToolStripMenuItem_Click(object sender, EventArgs e) { PlantAddEdit plantEditForm = new PlantAddEdit(new Plant(0)); plantEditForm.ShowDialog(); if (plantEditForm.DialogResult == DialogResult.OK) { planten.Add(plantEditForm.Plant); refreshView(); } }