Пример #1
0
        void DéconstruireP09(ref Element e)
        {
            dElement d;
            string   CodeAttribut = "";

            CodeAttribut = "ROLE_6PO_COPILOTE";
            foreach (int k in Role_6PO_CoPilote)
            {
                d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                e.Liste.Add(d);
            }

            CodeAttribut = "ROLE_6PO_MANAGER";
            foreach (int k in Role_6PO_Manager)
            {
                d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                e.Liste.Add(d);
            }

            CodeAttribut = "ROLE_6PO_CONSULTATION";
            foreach (int k in Role_6PO_Consultation)
            {
                d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                e.Liste.Add(d);
            }
        }
Пример #2
0
        void DéconstruireP08(ref Element e)
        {
            dElement d;
            string   CodeAttribut = "";

            {
                CodeAttribut = "DATE_DEBUT";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, string.Format("{0:dd/MM/yyyy}", DateDebut));
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "DATE_FIN";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, string.Format("{0:dd/MM/yyyy}", DateFin));
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "METEO";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, ((int)Meteo).ToString());
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "TX_AVANCEMENT";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, ((int)TxAvancement).ToString());
                e.Liste.Add(d);
            }

            if (ActionInnovante)
            {
                CodeAttribut = "ACTION_INNOVANTE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, "1");
                e.Liste.Add(d);
            }

            if (!(AnalyseQualitative is null))
            {
                CodeAttribut = "ANALYSE_QUALITATIVE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, AnalyseQualitative);
                e.Liste.Add(d);
            }

            if (!(ReductionInegalite is null))
            {
                CodeAttribut = "REDUCTION_INEGALITE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, ReductionInegalite);
                e.Liste.Add(d);
            }
        }
Пример #3
0
        void DéconstruireP05(ref Element e)
        {
            dElement d;
            string   CodeAttribut = "";

            //ANNEE_MO
            if (!(AnneeMiseOeuvre is null))
            {
                CodeAttribut = "ANNEE_MO";
                foreach (int k in AnneeMiseOeuvre)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            //DIRECTION_PILOTE
            if (!(DirectionPilote is null))
            {
                CodeAttribut = "DIRECTION_PILOTE";
                foreach (int k in DirectionPilote)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            // DIRECTION_ASSOCIE
            if (!(DirectionAssocie is null))
            {
                CodeAttribut = "DIRECTION_ASSOCIE";
                foreach (int k in DirectionAssocie)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            // EQUIPE
            if (!(Equipe is null))
            {
                CodeAttribut = "EQUIPE";
                foreach (int k in Equipe)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }
        }
Пример #4
0
        void DéconstruireP02(ref Element e)
        {
            dElement d;
            string   CodeAttribut = "";

            //PUBLIC_CIBLE
            if (!(PublicCible is null))
            {
                CodeAttribut = "PUBLIC_CIBLE";
                foreach (int k in PublicCible)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            //TERRITOIRE
            if (!(Territoire is null))
            {
                CodeAttribut = "TERRITOIRE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Territoire);
                e.Liste.Add(d);
            }

            // PARTENAIRE_INSTITU
            if (!(Partenaire is null))
            {
                CodeAttribut = "PARTENAIRE_INSTITU";
                foreach (int k in Partenaire)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            // PARTENAIRE_USAGER
            if (!(Usager is null))
            {
                CodeAttribut = "PARTENAIRE_USAGER";
                foreach (int k in Usager)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }
        }
Пример #5
0
        void DéconstruireP04(ref Element e)
        {
            dElement d;
            string   CodeAttribut = "";

            //RESULTAT_LIVRABLE
            if (!(ResultatLivrable is null))
            {
                CodeAttribut = "RESULTAT_LIVRABLE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, ResultatLivrable);
                e.Liste.Add(d);
            }

            //NB_PERS_IMPACT
            if (!!(NbPersImpact is null))
            {
                CodeAttribut = "NB_PERS_IMPACT";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, NbPersImpact);
                e.Liste.Add(d);
            }

            //NB_ACTEUR_MOBILISE
            if (!(NbActeurMobilise is null))
            {
                CodeAttribut = "NB_ACTEUR_MOBILISE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, NbActeurMobilise);
                e.Liste.Add(d);
            }

            //INDIC_RESULTAT
            if (!(IndicResultat is null))
            {
                CodeAttribut = "INDIC_RESULTAT";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, IndicResultat);
                e.Liste.Add(d);
            }

            //INDIC_MOYEN
            if (!(IndicMoyen is null))
            {
                CodeAttribut = "INDIC_MOYEN";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, IndicMoyen);
                e.Liste.Add(d);
            }
        }
Пример #6
0
        void DéconstruireP07(ref Element e)
        {
            dElement d;
            string   CodeAttribut = "";

            CodeAttribut = "TSANTE";
            foreach (int k in TSante)
            {
                d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                e.Liste.Add(d);
            }

            CodeAttribut = "PRIORITE_CTS";
            foreach (int k in Priorite_CTS)
            {
                d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                e.Liste.Add(d);
            }
        }
Пример #7
0
        //Transforme un utilisateur sous la forme Element, dElement
        public Element Déconstruire()
        {
            Element  e = new Element();
            dElement d;

            e.ID           = ID;
            e.Element_Type = Acces.type_UTILISATEUR.id;
            e.Code         = Code;
            e.Libelle      = Nom;
            e.Type_Element = (int)TypeUtilisateur;
            e.Actif        = Actif;

            string CodeAttribut = "";

            if (Prenom.Length > 0)
            {
                CodeAttribut = "PRENOM";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_UTILISATEUR.id, CodeAttribut), CodeAttribut, Prenom);
                e.Liste.Add(d);
            }

            if (Mail.Length > 0)
            {
                CodeAttribut = "MAIL";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_UTILISATEUR.id, CodeAttribut), CodeAttribut, Mail);
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "TYPE_LICENCE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_UTILISATEUR.id, CodeAttribut), CodeAttribut, ((int)TypeLicence).ToString());
                e.Liste.Add(d);
            }

            if (Direction > 0)
            {
                CodeAttribut = "DIRECTION";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_UTILISATEUR.id, CodeAttribut), CodeAttribut, Direction.ToString());
                e.Liste.Add(d);
            }

            return(e);
        }
Пример #8
0
        void DéconstruireP06(ref Element e)
        {
            dElement d;
            string   CodeAttribut = "";

            //LIEN_PLAN
            if (!(LienPlan is null))
            {
                CodeAttribut = "LIEN_PLAN";
                foreach (int k in LienPlan)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            // LIEN_PARCOURS
            if (!(LienParcours is null))
            {
                CodeAttribut = "LIEN_PARCOURS";
                foreach (int k in LienParcours)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            // LIEN_SECTEUR
            if (!(LienSecteur is null))
            {
                CodeAttribut = "LIEN_SECTEUR";
                foreach (int k in LienSecteur)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }
        }
Пример #9
0
        //Transforme un objectif sous la forme Element, dElement
        public Element Déconstruire()
        {
            Element  e = new Element();
            dElement d;

            e.ID           = ID;
            e.Element_Type = Acces.type_OBJECTIF.id;
            e.Code         = Code;
            e.Libelle      = Libelle;
            e.Type_Element = (int)TypeObjectif;
            e.Actif        = Actif;

            string CodeAttribut = "";

            if (!(Pilote is null))
            {
                CodeAttribut = "PILOTE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, Pilote.ID.ToString());
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "TYPE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, ((int)TypeObjectif).ToString());
                e.Liste.Add(d);
            }

            if (!(Description is null))
            {
                CodeAttribut = "DESCRIPTION";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, Description);
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "STATUT";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, ((int)Statut).ToString());
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "DATE_DEBUT";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, string.Format("{0:dd/MM/yyyy}", DateDebut));
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "DATE_FIN";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, string.Format("{0:dd/MM/yyyy}", DateFin));
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "METEO";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, ((int)Meteo).ToString());
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "TX_AVANCEMENT";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, ((int)TxAvancement).ToString());
                e.Liste.Add(d);
            }

            if (!(AnalyseQualitative is null))
            {
                CodeAttribut = "ANALYSE_QUALITATIVE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, AnalyseQualitative);
                e.Liste.Add(d);
            }

            CodeAttribut = "ROLE_6PO_COPILOTE";
            foreach (int k in Role_6PO_CoPilote)
            {
                d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                e.Liste.Add(d);
            }

            CodeAttribut = "ROLE_6PO_MANAGER";
            foreach (int k in Role_6PO_Manager)
            {
                d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                e.Liste.Add(d);
            }

            CodeAttribut = "ROLE_6PO_CONSULTATION";
            foreach (int k in Role_6PO_Consultation)
            {
                d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "_TYPE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, _type);
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "_CODEPLAN";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, _codeplan);
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "_AXE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, _axe);
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "_OS";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, _os);
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "_OG";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, _og);
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "_OP";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, _op);
                e.Liste.Add(d);
            }

            {
                CodeAttribut = "_CPL";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_OBJECTIF.id, CodeAttribut), CodeAttribut, _cpl);
                e.Liste.Add(d);
            }

            return(e);
        }
Пример #10
0
        void DéconstruireP03(ref Element e)
        {
            dElement d;
            string   CodeAttribut = "";

            //STRUCTURE PORTEUSE
            if (!(StructurePorteuse is null))
            {
                CodeAttribut = "STRUCTURE_PORTEUSE";
                foreach (int k in StructurePorteuse)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            //ACTEUR_SANTE
            if (!(Acteur is null))
            {
                CodeAttribut = "ACTEUR_SANTE";
                foreach (int k in Acteur)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            // LEVIER
            if (!(Levier is null))
            {
                CodeAttribut = "LEVIER";
                foreach (int k in Levier)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            //COUT_FINANCIER
            if (!(CoutFinancier is null))
            {
                CodeAttribut = "COUT_FINANCIER";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, CoutFinancier);
                e.Liste.Add(d);
            }

            //FINANCEMENT FIR
            if (FinancementFIR)
            {
                CodeAttribut = "FINANCEMENT_FIR";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, "1");
                e.Liste.Add(d);
            }

            //MT 2018
            if (!(Mt_2018 is null))
            {
                CodeAttribut = "MT_2018";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Mt_2018);
                e.Liste.Add(d);
            }

            //MT 2019
            if (!(Mt_2019 is null))
            {
                CodeAttribut = "MT_2019";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Mt_2019);
                e.Liste.Add(d);
            }

            //MT 2020
            if (!(Mt_2020 is null))
            {
                CodeAttribut = "MT_2020";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Mt_2020);
                e.Liste.Add(d);
            }

            //MT 2021
            if (!(Mt_2021 is null))
            {
                CodeAttribut = "MT_2021";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Mt_2021);
                e.Liste.Add(d);
            }

            //MT 2022
            if (!(Mt_2022 is null))
            {
                CodeAttribut = "MT_2022";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Mt_2022);
                e.Liste.Add(d);
            }

            //MT 2023
            if (!(Mt_2023 is null))
            {
                CodeAttribut = "MT_2023";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Mt_2023);
                e.Liste.Add(d);
            }

            //MT TOTAL
            if (!(Mt_Total is null))
            {
                CodeAttribut = "MT_TOTAL";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Mt_Total);
                e.Liste.Add(d);
            }
        }
Пример #11
0
        void DéconstruireP01(ref Element e)
        {
            dElement d;
            string   CodeAttribut = "";

            //PILOTE
            if (!(Pilote is null))
            {
                CodeAttribut = "PILOTE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Pilote.ID.ToString());
                e.Liste.Add(d);
            }

            //ACTION_PHARE
            if (ActionPhare)
            {
                CodeAttribut = "ACTION_PHARE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, (ActionPhare) ? "1" : "0");
                e.Liste.Add(d);
            }

            //ORDRE_ACTION_PHARE
            if (OrdreActionPhare > 0)
            {
                CodeAttribut = "ORDRE_ACTION_PHARE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, OrdreActionPhare.ToString());
                e.Liste.Add(d);
            }

            //STATUT
            {
                CodeAttribut = "STATUT";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Statut.ToString());
                e.Liste.Add(d);
            }

            //VALIDATION_INTERNE
            if (!(Validation < 0))
            {
                CodeAttribut = "VALIDATION_INTERNE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Validation.ToString());
                e.Liste.Add(d);
            }

            //DESCRIPTION
            if (!(Description is null))
            {
                CodeAttribut = "DESCRIPTION";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, Description);
                e.Liste.Add(d);
            }

            //TYPE
            if (!(_type is null))
            {
                CodeAttribut = "_TYPE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _type);
                e.Liste.Add(d);
            }

            //CODEPLAN
            if (!(_codeplan is null))
            {
                CodeAttribut = "_CODEPLAN";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _codeplan);
                e.Liste.Add(d);
            }

            if (!(_axe is null))
            {
                CodeAttribut = "_AXE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _axe);
                e.Liste.Add(d);
            }

            if (!(_os is null))
            {
                CodeAttribut = "_OS";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _os);
                e.Liste.Add(d);
            }

            if (!(_og is null))
            {
                CodeAttribut = "_OG";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _og);
                e.Liste.Add(d);
            }

            if (!(_op is null))
            {
                CodeAttribut = "_OP";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _op);
                e.Liste.Add(d);
            }

            if (!(_cpl is null))
            {
                CodeAttribut = "_CPL";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _cpl);
                e.Liste.Add(d);
            }

            if (!(_ordreact is null))
            {
                CodeAttribut = "_ORDREACT";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _ordreact);
                e.Liste.Add(d);
            }

            if (!(_annee is null))
            {
                CodeAttribut = "_ANNEE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _annee);
                e.Liste.Add(d);
            }

            if (!(_direction is null))
            {
                CodeAttribut = "_DIRECTION";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _direction);
                e.Liste.Add(d);
            }

            if (!(_reference is null))
            {
                CodeAttribut = "_REFERENCE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _reference);
                e.Liste.Add(d);
            }

            if (!(_ordreope is null))
            {
                CodeAttribut = "_ORDREOPE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, _ordreope);
                e.Liste.Add(d);
            }
        }
Пример #12
0
        //Transforme un plan sous la forme Element, dElement
        public Element Déconstruire()
        {
            Element  e = new Element();
            dElement d;

            e.ID           = ID;
            e.Element_Type = Acces.type_PLAN.id;
            e.Code         = Code;
            e.Libelle      = Libelle;
            e.Type_Element = (int)TypePlan;
            e.Actif        = Actif;

            string CodeAttribut = "";

            if (!(Pilote is null))
            {
                CodeAttribut = "PILOTE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, Pilote.ID.ToString());
                e.Liste.Add(d);
            }

            if (Abrege.Length > 0)
            {
                CodeAttribut = "ABREGE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, Abrege);
                e.Liste.Add(d);
            }

            CodeAttribut = "NIVEAU_6PO";
            d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, ((int)NiveauPlan).ToString());
            e.Liste.Add(d);

            CodeAttribut = "DATE_DEBUT";
            d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, DateDebut.ToString());
            e.Liste.Add(d);

            CodeAttribut = "DATE_FIN";
            d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, DateFin.ToString());
            e.Liste.Add(d);

            if (OptAnalyseGlobale == true)
            {
                CodeAttribut = "ANALYSE_GLOBALE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, "1");
                e.Liste.Add(d);
            }

            if (OptCommentaires == true)
            {
                CodeAttribut = "COMMENTAIRES";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, "1");
                e.Liste.Add(d);
            }

            if (OptGouvernance == true)
            {
                CodeAttribut = "GOUVERNANCE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, "1");
                e.Liste.Add(d);
            }

            if (OptPrioriteRegionale == true)
            {
                CodeAttribut = "PRIORITE_REGIONALE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, "1");
                e.Liste.Add(d);
            }

            // EQUIPE
            if (!(Equipe is null))
            {
                CodeAttribut = "EQUIPE";
                foreach (int k in Equipe)
                {
                    d = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_ACTION.id, CodeAttribut), CodeAttribut, k.ToString());
                    e.Liste.Add(d);
                }
            }

            if (GroupeExterne.Length > 0)
            {
                CodeAttribut = "GROUPE_EXTERNE";
                d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, GroupeExterne);
                e.Liste.Add(d);
            }
            CodeAttribut = "_TYPE";
            d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, _type);
            e.Liste.Add(d);

            CodeAttribut = "_REF1";
            d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, _ref1);
            e.Liste.Add(d);

            CodeAttribut = "_REF2";
            d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, _ref2);
            e.Liste.Add(d);

            CodeAttribut = "_OS";
            d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, _os);
            e.Liste.Add(d);

            CodeAttribut = "_OG";
            d            = new dElement(ID, Acces.Trouver_Attribut_ID(Acces.type_PLAN.id, CodeAttribut), CodeAttribut, _og);
            e.Liste.Add(d);

            return(e);
        }