| 12345678910111213141516171819202122232425262728293031 |
- 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<ActionEdu>
- {
- public SelectList Sel_Thematique;
- public SelectList Sel_Statut;
- public ActionEduViewModel(ActionEdu model, Entities dbContext, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
- {
- if (acces == ModeAcces.Creation | acces == ModeAcces.Modification)
- {
- ActionEduThematiqueFactory fact_thema = new ActionEduThematiqueFactory(dbContext);
- Sel_Thematique = new SelectList(fact_thema.getAll(), "Id", "Nom", Obj.ActionEduThematiqueId);
- ActionEduStatutFactory fact_statuts = new ActionEduStatutFactory(dbContext);
- Sel_Statut = new SelectList(fact_statuts.getAll(), "Id", "Nom", Obj.StatutId);
- }
- }
- public override int Annee_Id { get { return Obj.Annee.Id; } }
- public override string Annee_Lib { get { return Obj.Annee.Libelle; } }
- }
- }
|