Ejemplo n.º 1
0
        public Boolean ModifierTypeProjet(string type, string libelle)
        {
            type_projet TypeProj = DBcontext.type_projet.Find(type);

            if (TypeProj != null)
            {
                TypeProj.libelle = libelle;

                DBcontext.SaveChanges();
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
        public Boolean CreerTypeProjet(string type, string libelle)
        {
            type_projet TypeProj = DBcontext.type_projet.Find(type);

            if (TypeProj == null)
            {
                type_projet newtype = new type_projet()
                {
                    type    = type,
                    libelle = libelle
                };

                DBcontext.type_projet.Add(newtype);
                DBcontext.SaveChanges();
                return(true);
            }
            return(false);
        }