DeleteViewModel.cs 1013 B

1234567891011121314151617181920212223242526272829303132333435
  1. using CD67.FicheCollege.Entity;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. namespace CD67.FicheCollege.MVC.Models
  5. {
  6. // Modèle utilisé pour les pages de confirmation avant suppression des pages d'administration
  7. public class DeleteViewModel
  8. {
  9. public object Obj;
  10. public string TypeObjet { get; }
  11. public string NomObjet { get; }
  12. // (Facultatif) Mode d'accès à la page
  13. // Defaut: Lecture
  14. public ModeAcces Acces { get; set; }
  15. // Utilisateur courant
  16. public UtilisateurConnecte User;
  17. // ***************************
  18. // Constructeurs de base
  19. public DeleteViewModel(object model, string TypeObjet, string NomObjet)
  20. {
  21. this.Obj = model;
  22. this.TypeObjet = TypeObjet;
  23. this.NomObjet = NomObjet;
  24. Acces = ModeAcces.Suppression;
  25. User = Internal.UtilisateurConnecteFactory.getUtilisateurConnecte();
  26. }
  27. }
  28. }