private void btnOK_Click(object sender, EventArgs e) { if (frmNouvContrat.Controle()) { if (frmNouvContrat.Instancie()) { frmNouvContrat.DialogResult = DialogResult.OK; this.resultat = DialogResult.OK; } else { this.resultat = DialogResult.Cancel; } } }
/// <summary> /// Enregistrement du nouveau contrat /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnOK_Click(object sender, EventArgs e) { if (frmNouvContrat.Controle()) { if (frmNouvContrat.Instancie()) { frmNouvContrat.DialogResult = DialogResult.OK; //recupere la reference du contrat this.leContrat = frmNouvContrat.NouveauContrat; this.resultat = DialogResult.OK; } else { this.resultat = DialogResult.Cancel; } } }