public bool InsertRepertoire(Repertoire r) { try { if (DataContext == null) { throw new Exception("DAL empty"); } DataContext.Repertoire.InsertOnSubmit(r); return(true); } catch (Exception) { return(false); } }
public bool UpdateRepertoire(Repertoire r) { try { Repertoire rep = DataContext.Repertoire.Where(p => p.IDUtilisateur == r.IDUtilisateur && p.IDContact == r.IDContact).SingleOrDefault(); if (rep.Adresse != r.Adresse) { rep.Adresse = r.Adresse; } if (rep.Email != r.Email) { rep.Email = r.Email; } if (rep.Nom != r.Nom) { rep.Nom = r.Nom; } if (rep.NTel != r.NTel) { rep.NTel = r.NTel; } if (rep.Photo != r.Photo) { rep.Photo = r.Photo; } if (rep.Prenom != r.Prenom) { rep.Prenom = r.Prenom; } if (rep.Priorite != r.Priorite) { rep.Priorite = r.Priorite; } return(true); } catch (Exception) { return(false); } }
private void detach_Repertoire(Repertoire entity) { this.SendPropertyChanging(); entity.Utilisateurs = null; }
partial void DeleteRepertoire(Repertoire instance);
partial void UpdateRepertoire(Repertoire instance);
partial void InsertRepertoire(Repertoire instance);