예제 #1
0
 public void ModifyPays(int Id, string Nom)
 {
     using (var db = new MarcassinEntities1()) {
         Pay b = db.Pays.Find(Id);
         b.nomPays         = Nom;
         db.Entry(b).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #2
0
 public void ModifyLangue(int Id, string Nom)
 {
     using (var db = new MarcassinEntities1()) {
         Langue b = db.Langues.Find(Id);
         b.nomLangue       = Nom;
         db.Entry(b).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #3
0
 public void ModifyChat(int Id, string Nom)
 {
     using (var db = new MarcassinEntities1()) {
         ChatRoom b = db.ChatRooms.Find(Id);
         b.nomduRoom       = Nom;
         db.Entry(b).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #4
0
 public void ModifyVille(int Id, string Nom, Pay pays)
 {
     using (var db = new MarcassinEntities1()) {
         Ville b = db.Villes.Find(Id);
         b.nomVille        = Nom;
         b.Pay             = db.Pays.Find(pays.id_Pays);
         db.Entry(b).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #5
0
 public void ModifyBadge(int Id, string Nom, Langue Lang)
 {
     using (var db = new MarcassinEntities1()) {
         Badge b = db.Badges.Find(Id);
         b.nomBadge        = Nom;
         b.Langue          = db.Langues.Find(Lang.idLangue);
         db.Entry(b).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #6
0
 public void ModifyEnt(int Id, string Nom, Ville Ville)
 {
     using (var db = new MarcassinEntities1()) {
         Entreprise b = db.Entreprises.Find(Id);
         b.nomEntreprise   = Nom;
         b.Ville           = db.Villes.Find(Ville.id_Ville);
         db.Entry(b).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #7
0
 public void ModifyAdmin(int Id, string Prenom, string Nom, string Mdp)
 {
     using (var db = new MarcassinEntities1()) {
         Admin b = db.Admins.Find(Id);
         b.prenomAdmin     = Prenom;
         b.nomAdmin        = Nom;
         b.motDePasseAdmin = Mdp;
         db.Entry(b).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #8
0
 public void ModifyComp(int Id, string Nom, bool?Actif, Langue Lang)
 {
     using (var db = new MarcassinEntities1()) {
         Competence b = db.Competences.Find(Id);
         b.nomCompetence   = Nom;
         b.estActif        = Actif.Value;
         b.Langue          = db.Langues.Find(Lang.idLangue);
         db.Entry(b).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #9
0
 public void ModifyCours(int Id, string Nom, DateTime Date, bool?Finis, Competence Comp)
 {
     using (var db = new MarcassinEntities1()) {
         Cour b = db.Cours.Find(Id);
         b.nomCours  = Nom;
         b.dateCours = Date;
         if (Finis == null)
         {
             b.estFinit = false;
         }
         else
         {
             b.estFinit = true;
         }
         b.Competence = db.Competences.Find(Comp.idCompetence);
         ChatRoom cr = db.ChatRooms.Find(b.ChatRoom.idChatRoom);
         string   n  = Nom + " ChatRoom";
         cr.nomduRoom       = n;
         db.Entry(cr).State = EntityState.Modified;
         db.Entry(b).State  = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #10
0
 public void ModifyUtil(int Id, string Prenom, string Nom, int Age, string Email, string Linkedin, string Mdp, bool?Tuteur, bool?Externe, bool?Valide, Entreprise Ent, Ville Ville)
 {
     using (var db = new MarcassinEntities1()) {
         Utilisateur b = db.Utilisateurs.Find(Id);
         b.prenomUtilisateur       = Prenom;
         b.nomUtilisateur          = Nom;
         b.ageUtilisateur          = Age;
         b.emailUtilisateur        = Email;
         b.lienLinkedinUtilisateur = Linkedin;
         b.motDePasseUtilisateur   = Mdp;
         b.estTuteur       = Tuteur.Value;
         b.estExterne      = Externe.Value;
         b.estValide       = Valide.Value;
         b.Entreprise      = db.Entreprises.Find(Ent.id_Entreprise);
         b.Ville           = db.Villes.Find(Ville.id_Ville);
         db.Entry(b).State = EntityState.Modified;
         db.SaveChanges();
     }
 }