//[HttpPost]
        //public ActionResult ModifierAbsenceetud(Notess Lnotes)
        //{



        //    Repository<Note> _repNote = new Repository<Note>(AppConfig.DbConnexionString);
        //    List<Note> _notes = _repNote.GetAll(null, false).ToList();

        //    foreach (Note p in Lnotes.ListeNote)
        //    {
        //        _repNote.Update(p);
        //    }



        //    return RedirectToAction("Index");
        //}



        public ActionResult ModifierAbsenceensei(int id)
        {
            Repository <Cour>         _repcour   = new Repository <Cour>(AppConfig.DbConnexionString);
            Absencenseig              Lnotes     = new Absencenseig();
            Repository <PresenceEnse> _repradbtn = new Repository <PresenceEnse>(AppConfig.DbConnexionString);
            List <PresenceEnse>       _etudiant  = _repradbtn.GetAll(v => v.Idenseignant == id, false).ToList();

            Lnotes.ListePresenceEnseig = _etudiant;
            List <string> cours = new List <string>();

            //foreach (PresenceEnse e in _etudiant)
            //{
            //    {
            //        string cour = _repcour.GetSingle(x => x.IdCour == e.IdCour, false).Libelle;



            //        cours.Add(cour);

            //    }
            //    ViewBag.IDCour = cours;
            //}


            return(View(Lnotes));
        }
        public ActionResult ModifierAbsenceensei(Absencenseig Lnotes)
        {
            Repository <PresenceEnse> _repNote = new Repository <PresenceEnse>(AppConfig.DbConnexionString);
            List <PresenceEnse>       _notes   = _repNote.GetAll(null, false).ToList();

            foreach (PresenceEnse p in Lnotes.ListePresenceEnseig)
            {
                p.absence = p.IsPresnece;
                _repNote.Update(p);
            }



            return(RedirectToAction("Index"));
        }