Ejemplo n.º 1
0
 private void btnSaveService_Click(object sender, EventArgs e)
 {
     try
     {
         if (!blnService)
         {
             service.inserts();
             MessageBox.Show("Enregistrement éffectué", "Enregistrement", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             if (bsrcService.DataSource != null)
             {
                 clsservice s = (clsservice)bsrcService.Current;
                 new clsservice().update(s);
                 MessageBox.Show("Modification effectuée!", "Modification", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Echec de la mise à jour" + ex.Message, "Mise à jour", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     this.New();
     refreshService();
 }
Ejemplo n.º 2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (!bln)
         {
             service.inserts();
             MessageBox.Show("Enregistrement éffectué", "Enregistrement", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             if (bsrc.DataSource != null)
             {
                 clsservice s = (clsservice)bsrc.Current;
                 new clsservice().update(s);
                 MessageBox.Show("Modification effectuée!", "Modification", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
         //Permet l'actualisation des valeur des services sur le formulair des agents
         clsDoTraitement.EnterForFormService = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show("Echec de la mise à jour" + ex.Message, "Mise à jour", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     this.New();
     refresh();
 }