AnneeViewModel.cs 994 B

12345678910111213141516171819202122232425262728293031
  1. using CD67.FicheCollege.Entity;
  2. using CD67.FicheCollege.Factory;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Web.Mvc;
  6. namespace CD67.FicheCollege.MVC.Models
  7. {
  8. public class AnneeViewModel : BaseViewModel<Annee>
  9. {
  10. public IQueryable<Annee> ListAnnees;
  11. public AnneeViewModel(Annee model, Entities dbContext, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
  12. {
  13. AnneeFactory fact = new AnneeFactory(dbContext);
  14. ListAnnees = fact.getAll();
  15. }
  16. public override string Annee_Lib { get { return Obj.Libelle; } }
  17. }
  18. public class AnneeIndexViewModel : BaseViewModel<IEnumerable<Annee>>
  19. {
  20. public AnneeIndexViewModel(IEnumerable<Annee> model, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
  21. {
  22. }
  23. public override string Annee_Lib { get { return ""; } }
  24. }
  25. }