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 ActionEduThematiqueViewModel : BaseViewModel<ActionEduThematique>
    {
        public SelectList Sel_Axes;

        public ActionEduThematiqueViewModel(ActionEduThematique model, Entities dbContext, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
        {
            if (acces == ModeAcces.Creation | acces == ModeAcces.Modification)
            {
                ActionEduAxeFactory fact = new ActionEduAxeFactory(dbContext);
                Sel_Axes = new SelectList(fact.getAll(), "Id", "Nom", Obj.ActionEduAxeId);
            }
        }

        public override int Annee_Id { get { return 0; } }
        public override string Annee_Lib { get { return ""; } }
    }

    public class ActionEduThematiqueIndexViewModel : BaseViewModel<IEnumerable<ActionEduThematique>>
    {
        public ActionEduThematiqueIndexViewModel(IEnumerable<ActionEduThematique> model, ModeAcces acces = ModeAcces.Lecture, Dictionary<string, object> bag = null) : base(model, acces, bag)
        {
        }

        public override int Annee_Id { get { return 0; } }
        public override string Annee_Lib { get { return ""; } }

    }
}