Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. public static List<Utilisateur> AllMembers()
  2. {
  3. return Utilisateurs;
  4. }
  5.  
  6. public static int GetID(string name)
  7. {
  8. foreach (Utilisateur u in Utilisateurs)
  9. {
  10. if (u.Pseudo == name)
  11. return u.ID;
  12. }
  13. return 0;
  14. }
  15.  
  16. public static bool DeleteUtilisateur(int id)
  17. {
  18. foreach (Utilisateur user in Utilisateurs)
  19. {
  20. if (user.ID == id)
  21. {
  22. Utilisateurs.Remove(user);
  23. return true;
  24. }
  25. }
  26. return false;
  27. }
  28.  
  29. public static void AddCommentaire(int user, int isbn, string com)
  30. {
  31. foreach (Livre l in Livres)
  32. {
  33. if (l.ISBN == isbn)
  34. {
  35. l.AddCommentaire(user, com);
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement