Пример #1
0
        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);
        }
Пример #2
0
        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;*/
        }
Пример #3
0
        public resp_projet TestCreateResponsableP(string resp_projet)
        {
            resp_projet ResponsableTrouve = CprojBdd.resp_projet.FirstOrDefault(r => r.resp_email == resp_projet);

            return(ResponsableTrouve);
        }