ActionEduActeurViewModel.cs 885 B

1234567891011121314151617181920212223
  1. using CD67.FicheCollege.Entity;
  2. using CD67.FicheCollege.Factory;
  3. using CD67.FicheCollege.MVC.Internal;
  4. using System.Collections.Generic;
  5. using System.Web.Mvc;
  6. namespace CD67.FicheCollege.MVC.Models
  7. {
  8. public class ActionEduActeurViewModel : BaseViewModel<ActionEduActeur>
  9. {
  10. public SelectList Sel_Role;
  11. public ActionEduActeurViewModel(ActionEduActeur model, Entities dbContext, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
  12. {
  13. ActionEduActeurRoleFactory fact = new ActionEduActeurRoleFactory(dbContext);
  14. Sel_Role = new SelectList(fact.getAll(), "Id", "Libelle", Obj.RoleId);
  15. }
  16. public override int Annee_Id { get { return Obj.ActionEdu.Annee.Id; } }
  17. public override string Annee_Lib { get { return Obj.ActionEdu.Annee.Libelle; } }
  18. }
  19. }