/// <summary> /// Validate the entered data and close the dialog /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void onOk(object sender, EventArgs e) { m_stage = new Stage(); m_stage.setId(guiIdTxt.Text); m_stage.setDescription(guiDescriptionTxt.Text); String error; m_stage.addValidations(Stage.ValidationType.FromDialog); if (Database.DataConfiguration.validate(out error)) { m_madeSelection = true; this.Close(); } else { MessageBox.Show(error); } }