Example #1
0
        public void ModifierCompetence(COMPETENCE competence)
        {
            COMPETENCE competenceModif = new COMPETENCE();

            using (Context c = new Context())
            {
                competenceModif                    = c.COMPETENCE.First(a => a.id == competence.id);
                competenceModif.id                 = competence.id;
                competenceModif.intitule           = competence.intitule;
                competenceModif.id_TYPE_COMPETENCE = competence.id_TYPE_COMPETENCE;

                c.SaveChanges();
            }
        }
Example #2
0
        public void AjouterCompetence(string intitule, int typeCompetence)
        {
            using (Context c = new Context())
            {
                COMPETENCE competence = new COMPETENCE();
                //Hash MotDepasseHash = new Hash();
                competence.intitule           = intitule;
                competence.id_TYPE_COMPETENCE = typeCompetence;



                c.SaveChanges();
            }
        }
        public ActionResult supprimer(int supprimer)
        {
            COMPETENCE listCOMPETENCE = new COMPETENCE();

            try {
                using (var c = new Context())
                {
                    listCOMPETENCE = c.COMPETENCE.Where((a) => a.id == supprimer).First();

                    c.COMPETENCE.Remove(listCOMPETENCE);
                    c.SaveChanges();
                }
            }
            catch (Exception)
            {
                RedirectToAction("Index", "Competence");
            }
            return(RedirectToAction("Index", "Competence"));;
        }
Example #4
0
 public bool HasCompetnce(COMPETENCE cOMPETENCE)
 {
     return(this._HasCompetence(cOMPETENCE));
 }
Example #5
0
 private bool _HasCompetence(COMPETENCE competence)
 {
     return(this.Competnces[competence]);
 }
 private bool _HasCompetence(COMPETENCE competence)
 {
     return this.Competnces[competence];
 }
 public bool HasCompetnce(COMPETENCE cOMPETENCE)
 {
     return this._HasCompetence(cOMPETENCE);
 }