using CD67.FicheCollege.Entity; using CD67.FicheCollege.Factory; using CD67.FicheCollege.MVC.Internal; using System.Collections.Generic; using System.Web.Mvc; namespace CD67.FicheCollege.MVC.Models { public class ActionEduViewModel : BaseViewModel { public SelectList Sel_Thematique; public ActionEduViewModel(ActionEdu model, Entities dbContext, ModeAcces acces = ModeAcces.Lecture, Dictionary bag = null) : base(model, acces, bag) { if (acces == ModeAcces.Creation | acces == ModeAcces.Modification) { ActionEduThematiqueFactory fact = new ActionEduThematiqueFactory(dbContext); Sel_Thematique = new SelectList(fact.getAll(), "Id", "Nom", Obj.ActionEduThematiqueId); } } public override string Annee_Lib { get { return Obj.Annee.Libelle; } } } public class ActionEduIndexViewModel : BaseViewModel> { public ActionEduIndexViewModel(IEnumerable model, ModeAcces acces = ModeAcces.Lecture, Dictionary bag = null) : base(model, acces, bag) { } public override string Annee_Lib { get { return ""; } } } }