public Boolean update(Object o1, Object o2) { try { Organisateur or = (Organisateur)o1; Centre c = (Centre)o2; int id = or.id; String nom = or.nom_organisateur; String email = or.email; String adresse = or.adresse; String description = c.description; Pl_SQL plsql = new Pl_SQL(); string req = string.Format(plsql.ModifierCentre(id, nom, email, adresse, description)); 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(); } }
public Boolean delete(Object o) { try { int id = (int)o; Pl_SQL plsql = new Pl_SQL(); string req = string.Format(plsql.SupprimerOrganisateur(id)); cmd.Connection = cn; cn.Open(); cmd.CommandText = req; cmd.ExecuteNonQuery(); return(true); } catch (OleDbException) { return(false); } finally { cn.Close(); } }
public Boolean delete(Object o) { try { int matricule = (int)o; Pl_SQL plsql = new Pl_SQL(); string req = string.Format("delete participant where matricule=" + matricule); 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(); } }
public Boolean delete(Object o) { try { int id = (int)o; Pl_SQL plsql = new Pl_SQL(); string req = string.Format(plsql.SupprimerCentre(id)); 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(); } }