diff --git a/Context/EpContext.cs b/Context/EpContext.cs index a04449c..b0640c8 100644 --- a/Context/EpContext.cs +++ b/Context/EpContext.cs @@ -214,77 +214,610 @@ namespace EPAServeur.Context this.SaveChanges(); } - /*Les informations ajou + /*Les informations ajoutées pourront être conservées * */ - public void AjoutInformationsDeBase() //Les statuts pourront être ajoutés et conservés + public void AjoutInformationsDeBase() { //StatutFormation - StatutFormation s; - s = new StatutFormation { Libelle = "Planifiée" }; - this.StatutFormation.Add(s); - s = new StatutFormation { Libelle = "Replanifié" }; - this.StatutFormation.Add(s); - s = new StatutFormation { Libelle = "Réalisée" }; - this.StatutFormation.Add(s); - s = new StatutFormation { Libelle = "Annulée" }; - this.StatutFormation.Add(s); + StatutFormation statutPlanifie, statutReplanifie, statutRealise, statutAnnule; + statutPlanifie = new StatutFormation { Id = 1, Libelle = "Planifiée" }; + this.StatutFormation.Add(statutPlanifie); + statutReplanifie = new StatutFormation { Id = 2, Libelle = "Replanifié" }; + this.StatutFormation.Add(statutReplanifie); + statutRealise = new StatutFormation { Id = 3, Libelle = "Réalisée" }; + this.StatutFormation.Add(statutRealise); + statutAnnule = new StatutFormation { Id = 4, Libelle = "Annulée" }; + this.StatutFormation.Add(statutAnnule); //ModeFormation - ModeFormation m; - m = new ModeFormation { Libelle = "Externe" }; - this.ModeFormation.Add(m); - m = new ModeFormation { Libelle = "Interne" }; - this.ModeFormation.Add(m); - m = new ModeFormation { Libelle = "Présentiel" }; - this.ModeFormation.Add(m); - m = new ModeFormation { Libelle = "E-learning" }; - this.ModeFormation.Add(m); + ModeFormation modeExterne, modeInterne, modePresentiel, modeELearning; + modeExterne = new ModeFormation { Libelle = "Externe" }; + this.ModeFormation.Add(modeExterne); + modeInterne = new ModeFormation { Libelle = "Interne" }; + this.ModeFormation.Add(modeInterne); + modePresentiel = new ModeFormation { Libelle = "Présentiel" }; + this.ModeFormation.Add(modePresentiel); + modeELearning = new ModeFormation { Libelle = "E-learning" }; + this.ModeFormation.Add(modeELearning); //TypeFormation - TypeFormation type; - type = new TypeFormation { Libelle = "Externe" }; - this.TypeFormation.Add(type); - type = new TypeFormation { Libelle = "Interne" }; - this.TypeFormation.Add(type); - type = new TypeFormation { Libelle = "E-learning" }; - this.TypeFormation.Add(type); - type = new TypeFormation { Libelle = "Academy by Apside" }; - this.TypeFormation.Add(type); + TypeFormation typeExterne, typeInterne, typeELearning, typeAcademy; + typeExterne = new TypeFormation { Libelle = "Externe" }; + this.TypeFormation.Add(typeExterne); + typeInterne = new TypeFormation { Libelle = "Interne" }; + this.TypeFormation.Add(typeInterne); + typeELearning = new TypeFormation { Libelle = "E-learning" }; + this.TypeFormation.Add(typeELearning); + typeAcademy = new TypeFormation { Libelle = "Academy by Apside" }; + this.TypeFormation.Add(typeAcademy); //OrigineFormation - OrigineFormation of; - of = new OrigineFormation { Libelle = "Demande collaborateur" }; - this.OrigineFormation.Add(of); - of = new OrigineFormation { Libelle = "Exigence client" }; - this.OrigineFormation.Add(of); - of = new OrigineFormation { Libelle = "Exigence Apside" }; - this.OrigineFormation.Add(of); - of = new OrigineFormation { Libelle = "Formation réglementaire" }; - this.OrigineFormation.Add(of); + OrigineFormation origineFormationCollaborateur, origineFormationClient, origineFormationApside, origineFormationReglementaire; + origineFormationCollaborateur = new OrigineFormation { Libelle = "Demande collaborateur" }; + this.OrigineFormation.Add(origineFormationCollaborateur); + origineFormationClient = new OrigineFormation { Libelle = "Exigence client" }; + this.OrigineFormation.Add(origineFormationClient); + origineFormationApside = new OrigineFormation { Libelle = "Exigence Apside" }; + this.OrigineFormation.Add(origineFormationApside); + origineFormationReglementaire = new OrigineFormation { Libelle = "Formation réglementaire" }; + this.OrigineFormation.Add(origineFormationReglementaire); //OrigineDemandeFormation - OrigineDemandeFormation o; - o = new OrigineDemandeFormation { Libelle = "Demande collaborateur" }; - this.OrigineDemandeFormation.Add(o); - o = new OrigineDemandeFormation { Libelle = "Demande EP" }; - this.OrigineDemandeFormation.Add(o); - o = new OrigineDemandeFormation { Libelle = "Exigence Client" }; - this.OrigineDemandeFormation.Add(o); - o = new OrigineDemandeFormation { Libelle = "Formation réglementaire" }; - this.OrigineDemandeFormation.Add(o); - o = new OrigineDemandeFormation { Libelle = "Demande Apside" }; - this.OrigineDemandeFormation.Add(o); + OrigineDemandeFormation origineDemandeFormationCollaborateur, origineDemandeFormationEP, + origineDemandeFormationClient, origineDemandeFormationReglement, origineDemandeFormationApside; + origineDemandeFormationCollaborateur = new OrigineDemandeFormation { Libelle = "Demande collaborateur" }; + this.OrigineDemandeFormation.Add(origineDemandeFormationCollaborateur); + origineDemandeFormationEP = new OrigineDemandeFormation { Libelle = "Demande EP" }; + this.OrigineDemandeFormation.Add(origineDemandeFormationEP); + origineDemandeFormationClient = new OrigineDemandeFormation { Libelle = "Exigence Client" }; + this.OrigineDemandeFormation.Add(origineDemandeFormationClient); + origineDemandeFormationReglement = new OrigineDemandeFormation { Libelle = "Formation réglementaire" }; + this.OrigineDemandeFormation.Add(origineDemandeFormationReglement); + origineDemandeFormationApside = new OrigineDemandeFormation { Libelle = "Demande Apside" }; + this.OrigineDemandeFormation.Add(origineDemandeFormationApside); //TypeEntretien - TypeEntretien t; - t = new TypeEntretien { Libelle = "Sur site" }; - this.TypeEntretien.Add(t); - t = new TypeEntretien { Libelle = "Chez le client" }; - this.TypeEntretien.Add(t); - t = new TypeEntretien { Libelle = "Visioconférence" }; - this.TypeEntretien.Add(t); - t = new TypeEntretien { Libelle = "Téléphonique" }; - this.TypeEntretien.Add(t); + TypeEntretien typeSite, typeClient, typeVisio, typeTelephone; + typeSite = new TypeEntretien { Libelle = "Sur site" }; + this.TypeEntretien.Add(typeSite); + typeClient = new TypeEntretien { Libelle = "Chez le client" }; + this.TypeEntretien.Add(typeClient); + typeVisio = new TypeEntretien { Libelle = "Visioconférence" }; + this.TypeEntretien.Add(typeVisio); + typeTelephone = new TypeEntretien { Libelle = "Téléphonique" }; + this.TypeEntretien.Add(typeTelephone); + + //Formation + Formation f1, f2, f3;//Planifiées + Formation f4, f5; // Réalisées + Formation f6, f7, f8, f9;//Replanifiées + Formation f10, f11; //Annulées + //new DateTime(Année, Mois, Jour, Heure, Minute...) + + + List formations = new List(); + + f1 = new Formation + { + Intitule = "Formation1", + IdAgence = 1, + DateDebut = new DateTime(2020, 9, 16, 10, 0, 0), + DateFin = new DateTime(2020, 9, 16), + Heure = 2, + Jour = 1, + ModeFormation = modeELearning, + TypeFormation = typeELearning, + Organisme = "Organisme1", + Origine = origineFormationClient, + Statut = statutPlanifie, + EstCertifiee = false + }; + this.Formation.Add(f1); + + f2 = new Formation + { + Intitule = "Formation2", + IdAgence =1, + DateDebut = new DateTime(2020, 10, 5, 14, 0, 0), + DateFin = new DateTime(2020, 10, 9), + Heure = 10, + Jour = 5, + ModeFormation = modeExterne, + TypeFormation = typeExterne, + Organisme = "Organisme2", + Origine = origineFormationClient, + Statut = statutPlanifie, + EstCertifiee = false + }; + this.Formation.Add(f2); + + f3 = new Formation + { + Intitule = "Formation3", + IdAgence = 1, + DateDebut = new DateTime(2020, 9, 21, 14, 0, 0), + DateFin = new DateTime(2020, 9, 21), + Heure = 4, + Jour = 2, + ModeFormation = modeELearning, + TypeFormation = typeELearning, + Organisme = "Organisme2", + Origine = origineFormationApside, + Statut = statutPlanifie, + EstCertifiee = true + }; + this.Formation.Add(f3); + + f4 = new Formation + { + Intitule = "Formation4", + IdAgence = 1, + DateDebut = new DateTime(2020, 05, 11, 14, 0, 0), + DateFin = new DateTime(2020, 05, 11), + Heure = 3, + Jour = 1, + ModeFormation = modeELearning, + TypeFormation = typeAcademy, + Organisme = "Organisme2", + Origine = origineFormationCollaborateur, + Statut = statutRealise, + EstCertifiee = true + }; + this.Formation.Add(f4); + + f5 = new Formation + { + Intitule = "Formation5", + IdAgence = 1, + DateDebut = new DateTime(2020, 08, 1, 13, 0, 0), + DateFin = new DateTime(2020, 08, 3), + Heure = 6, + Jour = 2, + ModeFormation = modePresentiel, + TypeFormation = typeExterne, + Organisme = "Organisme3", + Origine = origineFormationClient, + Statut = statutRealise, + EstCertifiee = true + }; + this.Formation.Add(f5); + + f6 = new Formation + { + Intitule = "Formation6", + IdAgence = 1, + DateDebut = new DateTime(2020, 9, 30, 9, 0, 0), + DateFin = new DateTime(2020, 10, 1), + Heure = 4, + Jour = 2, + ModeFormation = modePresentiel, + TypeFormation = typeInterne, + Organisme = "Organisme4", + Origine = origineFormationClient, + Statut = statutReplanifie, + EstCertifiee = false + }; + this.Formation.Add(f6); + + f7 = new Formation + { + Intitule = "Formation7", + IdAgence = 1, + DateDebut = new DateTime(2020, 10, 5, 10, 0, 0), + DateFin = new DateTime(2020, 10, 8), + Heure = 6, + Jour = 5, + ModeFormation = modePresentiel, + TypeFormation = typeInterne, + Organisme = "Organisme2", + Origine = origineFormationClient, + Statut = statutReplanifie, + EstCertifiee = false + }; + this.Formation.Add(f7); + + f8 = new Formation + { + Intitule = "Formation2", + IdAgence = 1, + DateDebut = new DateTime(2020, 11, 18, 10, 0, 0), + DateFin = new DateTime(2020, 11, 20), + Heure = 6, + Jour = 3, + ModeFormation = modeELearning, + TypeFormation = typeAcademy, + Organisme = "Organisme4", + Origine = origineFormationClient, + Statut = statutReplanifie, + EstCertifiee = true + }; + this.Formation.Add(f8); + + f9 = new Formation + { + Intitule = "Formation9", + IdAgence = 1, + DateDebut = new DateTime(2020, 11, 15, 9, 0, 0), + DateFin = new DateTime(2020, 11, 15), + Heure = 3, + Jour = 1, + ModeFormation = modePresentiel, + TypeFormation = typeInterne, + Organisme = "Organisme3", + Origine = origineFormationClient, + Statut = statutReplanifie, + EstCertifiee = true + }; + this.Formation.Add(f9); + + f10 = new Formation + { + Intitule = "Formation10", + IdAgence = 1, + DateDebut = new DateTime(2020, 8, 3, 14, 0, 0), + DateFin = new DateTime(2020, 8, 3), + Heure = 2, + Jour = 1, + ModeFormation = modePresentiel, + TypeFormation = typeInterne, + Organisme = "Organisme4", + Origine = origineFormationClient, + Statut = statutAnnule, + EstCertifiee = false + }; + this.Formation.Add(f10); + + f11 = new Formation + { + Intitule = "Formation11", + IdAgence = 1, + DateDebut = new DateTime(2020, 04, 6, 9, 0, 0), + DateFin = new DateTime(2020, 04, 11), + Heure = 15, + Jour = 5, + ModeFormation = modePresentiel, + TypeFormation = typeInterne, + Organisme = "Organisme1", + Origine = origineFormationClient, + Statut = statutAnnule, + EstCertifiee = false + }; + this.Formation.Add(f11); + /* + formations.Add(f1); + formations.Add(f2); + formations.Add(f3); + formations.Add(f4); + formations.Add(f5); + formations.Add(f6); + formations.Add(f7); + formations.Add(f8); + formations.Add(f9); + formations.Add(f10); + formations.Add(f11); + + int[] npParticipants = { }; + */ + //Créer des EP qui ont déjà été effectué (pas grave si il y a des informations qui sont incohérentes) + //C1 ---> C5 Collaborateurs + //C5 --> C10 CP+Tech Lead + //RH --> RH + //AS --> Assistant + //COM --> Commercial + //DEL --> Delivery + // 10 EP + /* + Ep ep; + DemandeFormation df; + ParticipationFormation pf; + ep = new Ep + { + IdCollaborateur = "C1", + IdReferent = "COM1", + IdAgence = 1, + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeChamp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2017, 7, 7), + DatePrevisionnelle = new DateTime(2018, 7, 8), + Obligatoire = false, + Statut = StatutEP.Signe, + CV = "CV.pdf", + DateSaisie = new DateTime(2018, 6, 20) + }; + df = new DemandeFormation + { + Description = "Description formation", + DemandeRH = false, + DateDemande = new DateTime(2018, 7, 8), + }; + + + Ep.Add(ep); + + ep = new Ep + { + IdCollaborateur = "C1", + IdReferent = "C6", + IdAgence = 1, + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeChamp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2017, 7, 7), + DatePrevisionnelle = new DateTime(2018, 7, 8), + Obligatoire = false, + Statut = StatutEP.Signe, + CV = "CV.pdf", + DateSaisie = new DateTime(2018, 6, 20) + }; + Ep.Add(ep); + + ep = new Ep + { + IdCollaborateur = "C1", + IdReferent = "C6", + IdAgence = 1, + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeChamp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2017, 7, 7), + DatePrevisionnelle = new DateTime(2018, 7, 8), + Obligatoire = false, + Statut = StatutEP.Signe, + CV = "CV.pdf", + DateSaisie = new DateTime(2018, 6, 20) + }; + Ep.Add(ep); + + ep = new Ep + { + IdCollaborateur = "C1", + IdReferent = "C6", + IdAgence = 1, + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeChamp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2017, 7, 7), + DatePrevisionnelle = new DateTime(2018, 7, 8), + Obligatoire = false, + Statut = StatutEP.Signe, + CV = "CV.pdf", + DateSaisie = new DateTime(2018, 6, 20) + }; + Ep.Add(ep); + + ep = new Ep + { + IdCollaborateur = "C1", + IdReferent = "C6", + IdAgence = 1, + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeChamp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2017, 7, 7), + DatePrevisionnelle = new DateTime(2018, 7, 8), + Obligatoire = false, + Statut = StatutEP.Signe, + CV = "CV.pdf", + DateSaisie = new DateTime(2018, 6, 20) + }; + Ep.Add(ep); + + ep = new Ep + { + IdCollaborateur = "C1", + IdReferent = "C6", + IdAgence = 1, + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeChamp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2017, 7, 7), + DatePrevisionnelle = new DateTime(2018, 7, 8), + Obligatoire = false, + Statut = StatutEP.Signe, + CV = "CV.pdf", + DateSaisie = new DateTime(2018, 6, 20) + }; + Ep.Add(ep); + ep = new Ep + { + IdCollaborateur = "C1", + IdReferent = "C6", + IdAgence = 1, + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeChamp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2017, 7, 7), + DatePrevisionnelle = new DateTime(2018, 7, 8), + Obligatoire = false, + Statut = StatutEP.Signe, + CV = "CV.pdf", + DateSaisie = new DateTime(2018, 6, 20) + }; + Ep.Add(ep); + + ep = new Ep + { + IdCollaborateur = "C1", + IdReferent = "C6", + IdAgence = 1, + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeChamp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2017, 7, 7), + DatePrevisionnelle = new DateTime(2018, 7, 8), + Obligatoire = false, + Statut = StatutEP.Signe, + CV = "CV.pdf", + DateSaisie = new DateTime(2018, 6, 20) + }; + Ep.Add(ep); + + ep = new Ep + { + IdCollaborateur = "C1", + IdReferent = "C6", + IdAgence = 1, + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeChamp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2017, 7, 7), + DatePrevisionnelle = new DateTime(2018, 7, 8), + Obligatoire = false, + Statut = StatutEP.Signe, + CV = "CV.pdf", + DateSaisie = new DateTime(2018, 6, 20) + }; + Ep.Add(ep); + + ep = new Ep + { + IdCollaborateur = "C1", + IdReferent = "C6", + IdAgence = 1, + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeChamp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2017, 7, 7), + DatePrevisionnelle = new DateTime(2018, 7, 8), + Obligatoire = false, + Statut = StatutEP.Signe, + CV = "CV.pdf", + DateSaisie = new DateTime(2018, 6, 20) + }; + Ep.Add(ep); + */ + + + //AVoir un tableau pour dire combien de demande de formations seront faites pour chaque EP + //Avoir un tableau pour dire combien de demande de Participation seront faites et accepter (max : 11) + //La formation associée sera choisie de manière aléatoire parmi celles créées (pas grave si la cohérence niveau date est foireuse....) + //Pour chaque demande de formation... essayer d'avoir une fois la même personne dans une formation ?... lool + this.SaveChanges(); + } + + + public void AjoutChamps() + { + + Champ c; + //CHAMPS EPS + c = new Champ { Section="Mission/Projet", Ordre = 0, Texte="Impressions générales", TypeChamp=TypeChamp.EPS, TypeSaisie=TypeSaisie.Commentaire}; + this.Champ.Add(c); + c = new Champ { Section="Mission/Projet", Ordre = 1, Texte="Faits marquants", TypeChamp=TypeChamp.EPS, TypeSaisie = TypeSaisie.Commentaire }; + this.Champ.Add(c); + c = new Champ { Section="Mission/Projet", Ordre = 2, Texte="Succès", TypeChamp=TypeChamp.EPS}; + this.Champ.Add(c); + c = new Champ { Section="Mission/Projet", Ordre = 3, Texte="Retours Client/Chef de projet", TypeChamp=TypeChamp.EPS, TypeSaisie = TypeSaisie.Commentaire }; + this.Champ.Add(c); + + c = new Champ { Section = "Mission/Projet", Ordre = 4, Texte = "Difficultés", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Mission/Projet", Ordre = 5, Texte = "Relation Client/Chef de projet", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Mission/Projet", Ordre = 6, Texte = "Ambiance de travail", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Mission/Projet", Ordre = 7, Texte = "Intérêt technique", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Mission/Projet", Ordre = 8, Texte = "Site géographique", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + + + c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 0, Texte = "Motivation", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 1, Texte = "Adaptabilité", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 2, Texte = "Force de proposition", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 3, Texte = "Leadership", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 4, Texte = "Ecoute", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 5, Texte = "Prise de recul", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 6, Texte = "Sens du service", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 7, Texte = "Communication", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 8, Texte = "Rigueur", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 9, Texte = "Organisation", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + c = new Champ { Section = "Compétences", SousSection = "Compétences Techniques", Ordre = 0, Texte = "Nouvelle compétence", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence }; + this.Champ.Add(c); + + c = new Champ { Section = "Apside", Ordre = 0, Texte = "Relation avec la structure", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation}; + this.Champ.Add(c); + c = new Champ { Section = "Apside", Ordre = 1, Texte = "Sentiment d'écoute", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation}; + this.Champ.Add(c); + c = new Champ { Section = "Apside", Ordre = 2, Texte = "Perception de la stratégie de développement", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation}; + this.Champ.Add(c); + c = new Champ { Section = "Apside", Ordre = 3, Texte = "Esprit d'entreprise", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation}; + this.Champ.Add(c); + c = new Champ { Section = "Apside", Ordre = 4, Texte = "Transparence de l'information", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation}; + this.Champ.Add(c); + c = new Champ { Section = "Apside", Ordre = 5, Texte = "Politique de formation", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation}; + this.Champ.Add(c); + c = new Champ { Section = "Apside", Ordre = 6, Texte = "Satisfaction Apside", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation}; + this.Champ.Add(c); + + //CHAMPS EPA + c = new Champ { Section = "Formation", Ordre = 0, Texte = "Formations effectuées", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Aucun }; + this.Champ.Add(c); + c = new Champ { Section = "Evolution Professionnelle et Salarial", Ordre = 0, Texte = "Evolution de l'emploie", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Aucun }; + this.Champ.Add(c); + c = new Champ { Section = "Projet professionnel/Souhait d’évolution ", Ordre = 0, Texte = "A court terme", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Commentaire }; + this.Champ.Add(c); + c = new Champ { Section = "Projet professionnel/Souhait d’évolution ", Ordre = 1, Texte = "A long terme", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Commentaire }; + this.Champ.Add(c); + c = new Champ { Section = "Projet professionnel/Souhait d’évolution ", Ordre = 2, Texte = "Atouts/Freins pour ce projet", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Commentaire }; + this.Champ.Add(c); + c = new Champ { Section = "Projet professionnel/Souhait d’évolution ", Ordre = 3, Texte = "Commentaire référent", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Commentaire}; + this.Champ.Add(c); + + //CHAMPS EPASIX + c = new Champ { Section = "Evolution", Ordre = 1, Texte = "Evolution du salaire", TypeChamp = TypeChamp.EPASIXANS, TypeSaisie = TypeSaisie.Aucun }; + this.Champ.Add(c); + /*c = new Champ { Section = "", SousSection = "", Ordre = 0, Texte = "", TypeChamp = TypeChamp.EPASIXANS }; + this.Champ.Add(c); + c = new Champ { Section = "", SousSection = "", Ordre = 0, Texte = "", TypeChamp = TypeChamp.EPASIXANS }; + this.Champ.Add(c); + c = new Champ { Section = "", SousSection = "", Ordre = 0, Texte = "", TypeChamp = TypeChamp.EPASIXANS }; + this.Champ.Add(c);*/ + + //CHAMPS EVALUATION + c = new Champ { Section = "Evaluation", Ordre = 0, Texte = "Accueil et organisation", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Evaluation", Ordre = 1, Texte = "Compétences animateur", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Evaluation", Ordre = 2, Texte = "Pédagogie/Animation", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Evaluation", Ordre = 3, Texte = "Exhaustivité des sujets traités", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Evaluation", Ordre = 4, Texte = "Utilité/Apport de la formation", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Evaluation", Ordre = 5, Texte = "Contenu théorique", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Evaluation", Ordre = 6, Texte = "Contenu pratique", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Evaluation", Ordre = 7, Texte = "Equilibre pratique/théorie", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Evaluation", Ordre = 8, Texte = "Support de cours", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + c = new Champ { Section = "Evaluation", Ordre = 9, Texte = "Durée", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation }; + this.Champ.Add(c); + + this.SaveChanges(); } } diff --git a/Models/EP/Ep.cs b/Models/EP/Ep.cs index 51a5b28..3920a52 100644 --- a/Models/EP/Ep.cs +++ b/Models/EP/Ep.cs @@ -35,10 +35,11 @@ namespace EPAServeur.Models.EP public DateTime DateCreation { get; set; } public DateTime DateSaisie { get; set; } public DateTime DatePrevisionnelle { get; set; } - public int Statut { get; set; } + public StatutEP Statut { get; set; } public string CV { get; set; } public string CommentaireAssistante { get; set; } - public string CommentaireReferent { get; set; } + public string CommentaireObjectifsPrecedent { get; set; } + public string CommentaireObjectifs { get; set; } public AugmentationSalaire AugmentationSalaire { get; set; } public Autorisation Autorisation { get; set; } public Delegation Delegation { get; set; } diff --git a/Models/Formation/Formation.cs b/Models/Formation/Formation.cs index 17ef8e8..27c295d 100644 --- a/Models/Formation/Formation.cs +++ b/Models/Formation/Formation.cs @@ -9,7 +9,7 @@ namespace EPAServeur.Models.Formation { public int Id { get; set; } public string Intitule { get; set; } - + public int IdAgence { get; set; } public DateTime DateDebut { get; set; } public DateTime DateFin { get; set; } public int Jour { get; set; } diff --git a/Models/SaisieChamp/Champ.cs b/Models/SaisieChamp/Champ.cs index b9ac974..c17dd39 100644 --- a/Models/SaisieChamp/Champ.cs +++ b/Models/SaisieChamp/Champ.cs @@ -10,6 +10,7 @@ namespace EPAServeur.Models.SaisieChamp EPS, EPA, EPASIXANS, + EPI, Evaluation } @@ -21,6 +22,7 @@ namespace EPAServeur.Models.SaisieChamp public string SousSection { get; set; } public int Ordre { get; set; } public TypeChamp TypeChamp { get; set; } + public TypeSaisie TypeSaisie { get; set; } public List Saisies { get; set; } } } diff --git a/Models/SaisieChamp/Saisie.cs b/Models/SaisieChamp/Saisie.cs index 05311b8..560a1b8 100644 --- a/Models/SaisieChamp/Saisie.cs +++ b/Models/SaisieChamp/Saisie.cs @@ -9,9 +9,12 @@ namespace EPAServeur.Models.SaisieChamp { public enum TypeSaisie { - Commentaire, - Competence, - Notation + Commentaire, //Un unique Texte + Competence, //Un Texte et un Niveau + Notation, //Une note et un Texte + DoubleText, //Un Texte et un autre Texte2 + Aucun // Permet d'avoir un champ sans le lié à une saisie dans le cas où les données sont récupérées et traitées directement avec les donnée en base. + } public class Saisie @@ -20,6 +23,7 @@ namespace EPAServeur.Models.SaisieChamp public Champ Champ { get; set; } public int? Note { get; set; } public string Texte { get; set; } + public string Texte2 { get; set; } public int? Niveau { get; set; } public TypeSaisie TypeSaisie { get; set; } } diff --git a/Program.cs b/Program.cs index 1c1abac..20a9280 100644 --- a/Program.cs +++ b/Program.cs @@ -34,6 +34,7 @@ namespace EPAServeur context.Database.EnsureCreated(); context.SaveChanges(); context.AjoutInformationsDeBase(); + context.AjoutChamps(); } } }