Пример #1
0
 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;
         }
     }
 }
Пример #2
0
 /// <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;
         }
     }
 }