示例#1
0
 /// <summary>
 /// Constructeur, instancie et affiche un form frmContrat vide et Ajoute les actions aux boutons Valider et Annuler
 /// </summary>
 public ctrlNouvContrat()
 {
     leForm = new frmContrat();
     leForm.btnAnnuler.Click  += new EventHandler(this.btnAnnuler_Click);
     leForm.btnValider.Click  += new EventHandler(this.btnValider_Click);
     leForm.dtpDateFin.Enabled = false;
     leForm.ShowDialog();
 }
示例#2
0
 public ctrlVisuContrat(MContrat unContrat, bool modif)
 {
     leContrat   = unContrat;
     leForm      = new frmContrat(unContrat);
     leForm.Text = "Contrat N°" + unContrat.NumContrat;
     leForm.ModeVisu();
     leForm.btnAnnuler.Visible     = false;
     leForm.btnValider.Click      += this.btnValider_Click;
     leForm.btnAjoutAvenant.Click += this.btnAjoutAvenant_Click;
     if (modif == true)
     {
         leForm.ShowDialog();
     }
     else
     {
         leForm.MdiParent = frmMDI.getInstance();
         leForm.Show();
     }
 }