public string CreerRespProj(string resp_email, string niveau_habilitation, short Id_association) { resp_projet ResponsableProjet = new resp_projet() { resp_email = resp_email, niveau_habilitation = niveau_habilitation, id_association = Id_association }; CprojBdd.resp_projet.Add(ResponsableProjet); CprojBdd.SaveChanges(); return(ResponsableProjet.resp_email); }
public void TestCreatePortefeuille(string resp_projet, string libelle, string niveau_habilitation, short Id_association) { resp_projet testResp = TestCreateResponsableP(resp_projet); if (testResp == null) { CreerRespProj(resp_projet, niveau_habilitation, Id_association); } portefeuille_projet portefeuilleTrouve = CprojBdd.portefeuille_projet.FirstOrDefault(portefeuille => portefeuille.libelle == libelle); if (portefeuilleTrouve == null) { CreerPortefeuilleProj(resp_projet, libelle); } /*if (portefeuilleTrouve != null) * * ComboxPortefeuille.SelectedIndex = ComboxPortefeuille.FindStringExact("Portefeuille Ecotourisme"); * return ComboxPortefeuille.SelectedIndex;*/ }
public resp_projet TestCreateResponsableP(string resp_projet) { resp_projet ResponsableTrouve = CprojBdd.resp_projet.FirstOrDefault(r => r.resp_email == resp_projet); return(ResponsableTrouve); }