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(); } }
public Boolean insert(Object o) { try { Budget b = (Budget)o; int id = b.id; int annee = b.annee; double montant_provisoire = b.montant_provisoire; double montant_final = b.montant_final; double montantBudget1 = b.b1.montant; double montantBudget2 = b.b2.montant; PLSQL.Pl_SQL plSql = new PLSQL.Pl_SQL(); string req = string.Format(plSql.FixerBudget(id, annee, montant_provisoire, montant_final, montantBudget1, montantBudget2)); 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 insert(Object o) { try { Admin a = (Admin)o; int matricule = a.personnel.matricule; String login = a.login; String password = a.password; PLSQL.Pl_SQL plSql = new PLSQL.Pl_SQL(); string req = string.Format(plSql.Inscrire(matricule, login, password)); 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 accepterAdherent(int matricule, int idActivite, int id, int valeur) { try { PLSQL.Pl_SQL plSql = new PLSQL.Pl_SQL(); string req = string.Format(plSql.AccepterDemandeAdherent(matricule, idActivite, id, valeur)); cmd.Connection = cn; cn.Open(); cmd.CommandText = req; cmd.ExecuteNonQuery(); return(true); } catch (OleDbException) { return(false); } finally { cn.Close(); } }
public Boolean refuser(Participation p) { try { int id = p.id; PLSQL.Pl_SQL plSql = new PLSQL.Pl_SQL(); string req = string.Format(plSql.RefuserDemandeAdherent(id)); cmd.Connection = cn; cn.Open(); cmd.CommandText = req; cmd.ExecuteNonQuery(); return(true); } catch (OleDbException) { return(false); } finally { cn.Close(); } }
public Boolean insert(Object o) { try { Activite a = (Activite)o; int id = a.id; String nom_activite = a.nom_Activite; int capacite = a.capacite; int nombre_participant = a.nombre_participant; String date_debut = a.date_debut; String date_fin = a.date_fin; double prix_unitaire = a.prix_unitaire; double montant_prevu = a.montant_prevu; double montant_actuel = a.montant_actuel; int idBudgetCategorie = a.idBudgetCategorie; int idOrganisateur = a.idOrganisateur; String date_debut_inscription = a.date_debut_inscription; String date_fin_inscription = a.date_fin_inscription; int nbr_point = a.nbr_point; PLSQL.Pl_SQL plSql = new PLSQL.Pl_SQL(); string req = string.Format(plSql.AjouterActivite(nom_activite, capacite, date_debut, date_fin, prix_unitaire, montant_prevu, montant_actuel, idBudgetCategorie, idOrganisateur, date_debut_inscription, date_fin_inscription, nbr_point)); 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 ModifierActivite(int id, String nom_activite, int capacite, String date_fin_inscription, String date_debut, String date_fin, double prix_unitaire, double montant_prevu, int nbr_point, int idBudgetCat, double provisoire_ajouter, int idOldBudgetCat) { try { PLSQL.Pl_SQL plSql = new PLSQL.Pl_SQL(); string req = string.Format(plSql.ModifierActivite(id, nom_activite, capacite, date_fin_inscription, date_debut, date_fin, prix_unitaire, montant_prevu, nbr_point, idBudgetCat, provisoire_ajouter, idOldBudgetCat)); 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 matricule = (int)o; PLSQL.Pl_SQL plSql = new PLSQL.Pl_SQL(); string req = string.Format(plSql.SupprimerAdmin(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(); } }