Beispiel #1
0
 public Boolean delete(Object o)
 {
     try
     {
         Activite     a             = (Activite)o;
         int          id            = a.id;
         double       montant_prevu = a.montant_prevu;
         PLSQL.Pl_SQL plSql         = new PLSQL.Pl_SQL();
         string       req           = string.Format(plSql.SupprimerActivite(id, montant_prevu));
         cmd.Connection = cn;
         cn.Open();
         cmd.CommandText = req;
         cmd.ExecuteNonQuery();
         return(true);
     }
     catch (OleDbException ex)
     {
         System.Console.WriteLine("error :" + ex.Message);
         return(false);
     }
     finally
     {
         cn.Close();
     }
 }