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); }
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); }