diff --git a/EPAServeur/Context/DataSeeder.cs b/EPAServeur/Context/DataSeeder.cs index 8403d4d..f76d731 100644 --- a/EPAServeur/Context/DataSeeder.cs +++ b/EPAServeur/Context/DataSeeder.cs @@ -23,7 +23,7 @@ namespace EPAServeur.Context AddTypesEntretien(epContext); AddFormations(epContext); - + //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) @@ -64,18 +64,18 @@ namespace EPAServeur.Context TypeEntretien typeSite, typeClient, typeVisio, typeTelephone; typeSite = new TypeEntretien { Libelle = "Sur site" }; - epContext.TypeEntretien.Add(typeSite); + epContext.TypeEntretien.Add(typeSite); typeClient = new TypeEntretien { Libelle = "Chez le client" }; - epContext.TypeEntretien.Add(typeClient); + epContext.TypeEntretien.Add(typeClient); typeVisio = new TypeEntretien { Libelle = "Visioconférence" }; - epContext.TypeEntretien.Add(typeVisio); + epContext.TypeEntretien.Add(typeVisio); typeTelephone = new TypeEntretien { Libelle = "Téléphonique" }; - epContext.TypeEntretien.Add(typeTelephone); + epContext.TypeEntretien.Add(typeTelephone); - epContext.SaveChanges(); + epContext.SaveChanges(); } /// @@ -443,10 +443,10 @@ namespace EPAServeur.Context f1 = new Formation { - Intitule = "Formation1", - - DateDebut = new DateTime(2020, 9, 16, 10, 0, 0), - DateFin = new DateTime(2020, 9, 17), + Intitule = "Formation Mainframe Complète", + + DateDebut = new DateTime(2020, 1, 25, 10, 0, 0), + DateFin = new DateTime(2020, 1, 27), IdAgence = 1, Heure = 2, Jour = 1, @@ -461,10 +461,10 @@ namespace EPAServeur.Context f2 = new Formation { - Intitule = "Formation2", - - DateDebut = new DateTime(2020, 10, 5, 14, 0, 0), - DateFin = new DateTime(2020, 10, 9), + Intitule = "Formation professionnelle React + Redux", + + DateDebut = new DateTime(2020, 2, 25, 14, 0, 0), + DateFin = new DateTime(2020, 2, 27), IdAgence = 1, Heure = 10, Jour = 5, @@ -479,10 +479,10 @@ namespace EPAServeur.Context f3 = new Formation { - Intitule = "Formation3", - - DateDebut = new DateTime(2020, 9, 21, 14, 0, 0), - DateFin = new DateTime(2020, 9, 21), + Intitule = "Apprendre C# et le développement de logiciels avec WPF", + + DateDebut = new DateTime(2020, 5, 25, 14, 0, 0), + DateFin = new DateTime(2020, 5, 27), IdAgence = 1, Heure = 4, Jour = 2, @@ -497,10 +497,10 @@ namespace EPAServeur.Context f4 = new Formation { - Intitule = "Formation4", - - DateDebut = new DateTime(2020, 05, 11, 14, 0, 0), - DateFin = new DateTime(2020, 05, 11), + Intitule = "Formation Visual Basic.Net - Initiation + Approfondissement", + + DateDebut = new DateTime(2020, 7, 25, 14, 0, 0), + DateFin = new DateTime(2020, 7, 27), IdAgence = 1, Heure = 3, Jour = 1, @@ -515,10 +515,10 @@ namespace EPAServeur.Context f5 = new Formation { - Intitule = "Formation5", - - DateDebut = new DateTime(2020, 08, 1, 13, 0, 0), - DateFin = new DateTime(2020, 08, 3), + Intitule = "Formation Conception, langage SQL : Les fondamentaux", + + DateDebut = new DateTime(2020, 8, 25, 14, 0, 0), + DateFin = new DateTime(2020, 8, 27), IdAgence = 1, Heure = 6, Jour = 2, @@ -533,10 +533,10 @@ namespace EPAServeur.Context f6 = new Formation { - Intitule = "Formation6", - - DateDebut = new DateTime(2020, 9, 30, 9, 0, 0), - DateFin = new DateTime(2020, 10, 1), + Intitule = "Formation Laravel 5.x, Développement WEB en PHP", + + DateDebut = new DateTime(2020, 9, 25, 14, 0, 0), + DateFin = new DateTime(2020, 9, 27), IdAgence = 1, Heure = 4, Jour = 2, @@ -551,10 +551,10 @@ namespace EPAServeur.Context f7 = new Formation { - Intitule = "Formation7", - - DateDebut = new DateTime(2020, 10, 5, 10, 0, 0), - DateFin = new DateTime(2020, 10, 8), + Intitule = "Formation d’initiation aux Méthodes Agiles – Scrum", + + DateDebut = new DateTime(2020, 11, 25, 14, 0, 0), + DateFin = new DateTime(2020, 11, 27), IdAgence = 1, Heure = 6, Jour = 5, @@ -569,9 +569,9 @@ namespace EPAServeur.Context f8 = new Formation { - Intitule = "Formation8", - DateDebut = new DateTime(2020, 11, 18, 10, 0, 0), - DateFin = new DateTime(2020, 11, 20), + Intitule = "Formation Xamarin, Développer des applications mobiles en C# pour iOS et Android", + DateDebut = new DateTime(2020, 12, 25, 14, 0, 0), + DateFin = new DateTime(2020, 12, 27), IdAgence = 1, Heure = 6, Jour = 3, @@ -586,7 +586,7 @@ namespace EPAServeur.Context f9 = new Formation { - Intitule = "Formation9", + Intitule = "Formation Développer des Web Services en Java", DateDebut = new DateTime(2020, 11, 15, 9, 0, 0), DateFin = new DateTime(2020, 11, 15), IdAgence = 1, @@ -603,7 +603,7 @@ namespace EPAServeur.Context f10 = new Formation { - Intitule = "Formation10", + Intitule = "Architecture Microservices – Les fondamentaux", DateDebut = new DateTime(2020, 8, 3, 14, 0, 0), DateFin = new DateTime(2020, 8, 3), IdAgence = 1, @@ -620,7 +620,7 @@ namespace EPAServeur.Context f11 = new Formation { - Intitule = "Formation11", + Intitule = "Formation Clean Architecture .Net Core", DateDebut = new DateTime(2020, 04, 6, 9, 0, 0), DateFin = new DateTime(2020, 04, 11), IdAgence = 1, @@ -636,24 +636,486 @@ namespace EPAServeur.Context epContext.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 = { }; */ + // EP + Ep ep12, ep13, ep14, ep15; + Ep ep16, ep17, ep18, ep19; + Ep ep20; + + ep12 = new Ep + { + IdCollaborateur = Guid.Parse("842650db-a548-4472-a3af-4c5fff3c1ab8"), + IdReferent = Guid.Parse("aa36f34c-9041-42f5-9db3-6536fe7f1696"), + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeEp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2020, 1, 21, 9, 0, 0), + DatePrevisionnelle = new DateTime(2020, 1, 22, 9, 0, 0), + Obligatoire = false, + Statut = StatutEp.SignatureReferent, + CV = "CV.pdf", + DateSaisie = new DateTime(2020, 1, 23) + }; + epContext.Ep.Add(ep12); + + ep13 = new Ep + { + IdCollaborateur = Guid.Parse("301ba7f3-095e-4912-8998-a7c942dc5f23"), + IdReferent = Guid.Parse("ea027734-ff0f-4308-8879-133a09fb3c46"), + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeEp.EPS, + NumeroEp = 3, + DateCreation = new DateTime(2020, 2, 22, 9, 0, 0), + DatePrevisionnelle = new DateTime(2020, 2, 25, 9, 0, 0), + Obligatoire = false, + Statut = StatutEp.SignatureReferent, + CV = "CV.pdf", + DateSaisie = new DateTime(2020, 2, 23) + }; + epContext.Ep.Add(ep13); + + ep14 = new Ep + { + IdCollaborateur = Guid.Parse("a0f40e2a-cc03-4032-a627-5389e1281c64"), + IdReferent = Guid.Parse("56e3d82d-4be4-4449-a1f7-b4004b6bd186"), + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeEp.EPS, + NumeroEp = 1, + DateCreation = new DateTime(2020, 3, 22, 9, 0, 0), + DatePrevisionnelle = new DateTime(2020, 3, 25, 9, 0, 0), + Obligatoire = false, + Statut = StatutEp.SignatureReferent, + CV = "CV.pdf", + DateSaisie = new DateTime(2020, 3, 23) + }; + + epContext.Ep.Add(ep14); + + ep15 = new Ep + { + IdCollaborateur = Guid.Parse("4f3fcd23-a1e4-4c9e-afa2-d06ca9216491"), + IdReferent = Guid.Parse("25d2b0ce-5c95-4ccc-98bb-63b06c4ee4ad"), + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeEp.EPS, + NumeroEp = 1, + DateCreation = new DateTime(2020, 4, 22, 9, 0, 0), + DatePrevisionnelle = new DateTime(2020, 4, 25, 9, 0, 0), + Obligatoire = false, + Statut = StatutEp.SignatureReferent, + CV = "CV.pdf", + DateSaisie = new DateTime(2020, 4, 23) + }; + + ep16 = new Ep + { + IdCollaborateur = Guid.Parse("0968ccd3-1ef5-4041-83f3-1c76afb02bbf"), + IdReferent = Guid.Parse("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"), + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeEp.EPA, + NumeroEp = 1, + DateCreation = new DateTime(2020, 5, 22, 9, 0, 0), + DatePrevisionnelle = new DateTime(2020, 5, 25, 9, 0, 0), + Obligatoire = false, + Statut = StatutEp.SignatureReferent, + CV = "CV.pdf", + DateSaisie = new DateTime(2020, 5, 23) + }; + + epContext.Ep.Add(ep16); + + ep17 = new Ep + { + IdCollaborateur = Guid.Parse("e7820f92-eab1-42f5-ae96-5c16e71ff1e6"), + IdReferent = Guid.Parse("d4fc247b-015a-44d6-8f3e-a52f0902d2bf"), + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeEp.EPS, + NumeroEp = 1, + DateCreation = new DateTime(2020, 6, 22, 9, 0, 0), + DatePrevisionnelle = new DateTime(2020, 6, 25, 9, 0, 0), + Obligatoire = false, + Statut = StatutEp.SignatureReferent, + CV = "CV.pdf", + DateSaisie = new DateTime(2020, 6, 23) + }; + + epContext.Ep.Add(ep17); + + ep18 = new Ep + { + IdCollaborateur = Guid.Parse("1429be5b-9125-482c-80c4-c1d34afbd8d2"), + IdReferent = Guid.Parse("3f276ab8-727a-4e26-ad5d-4d296158688e"), + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeEp.EPS, + NumeroEp = 1, + DateCreation = new DateTime(2020, 7, 22, 9, 0, 0), + DatePrevisionnelle = new DateTime(2020, 7, 25, 9, 0, 0), + Obligatoire = false, + Statut = StatutEp.SignatureReferent, + CV = "CV.pdf", + DateSaisie = new DateTime(2020, 7, 23) + }; + + epContext.Ep.Add(ep18); + + ep19 = new Ep + { + IdCollaborateur = Guid.Parse("13fbe621-1bc9-4f04-afde-b54ca076e239"), + IdReferent = Guid.Parse("f1d14915-89f7-4c1a-a8e1-4148ed7d81d7"), + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeEp.EPASIXANS, + NumeroEp = 1, + DateCreation = new DateTime(2020, 8, 22, 9, 0, 0), + DatePrevisionnelle = new DateTime(2020, 8, 25, 9, 0, 0), + Obligatoire = false, + Statut = StatutEp.SignatureReferent, + CV = "CV.pdf", + DateSaisie = new DateTime(2020, 8, 23) + }; + + epContext.Ep.Add(ep19); + + ep20 = new Ep + { + IdCollaborateur = Guid.Parse("b5254c6c-7caa-435f-a4bb-e0cf92559832"), + IdReferent = Guid.Parse("dfea9a3c-7896-444d-9aa0-61ae536091c1"), + IdBu = 2, + Fonction = "Dev", + TypeEP = TypeEp.EPS, + NumeroEp = 1, + DateCreation = new DateTime(2020, 9, 22, 9, 0, 0), + DatePrevisionnelle = new DateTime(2020, 9, 25, 9, 0, 0), + Obligatoire = false, + Statut = StatutEp.SignatureReferent, + CV = "CV.pdf", + DateSaisie = new DateTime(2020, 9, 23) + }; + + epContext.Ep.Add(ep20); + + // Demande de formation + DemandeFormation d1, d2, d3, d4;//EnAttente + DemandeFormation d5, d6, d7, d8; // Validee + DemandeFormation d9, d10, d11, d12;//Rejetee + + d1 = new DemandeFormation + { + Libelle = "Formation Cobol", + Description = "Demande de formation Cobol avec Mainframe", + DemandeRH = false, + DateDemande = new DateTime(2020, 1, 22, 9, 0, 0), + Etat = EtatDemande.EnAttente, + CommentaireRefus = null, + DateDerniereReponse = null, + Ep = ep12 + }; + + epContext.DemandeFormation.Add(d1); + + d2 = new DemandeFormation + { + Libelle = "Formation React", + Description = "Demande de formation React avec Redux", + DemandeRH = false, + DateDemande = new DateTime(2020, 2, 22, 9, 0, 0), + Etat = EtatDemande.EnAttente, + CommentaireRefus = null, + DateDerniereReponse = null, + Ep = ep13 + }; + + epContext.DemandeFormation.Add(d2); + + d3 = new DemandeFormation + { + Libelle = "Formation C#", + Description = "Demande de formation C# avec WPF", + DemandeRH = false, + DateDemande = new DateTime(2020, 3, 22, 9, 0, 0), + Etat = EtatDemande.EnAttente, + CommentaireRefus = null, + DateDerniereReponse = null, + Ep = ep14 + }; + + epContext.DemandeFormation.Add(d3); + + d4 = new DemandeFormation + { + Libelle = "Formation C#", + Description = "Demande de formation C# avec WPF", + DemandeRH = false, + DateDemande = new DateTime(2020, 4, 22, 9, 0, 0), + Etat = EtatDemande.EnAttente, + CommentaireRefus = null, + DateDerniereReponse = null, + Ep = ep13 + }; + + epContext.DemandeFormation.Add(d4); + + d5 = new DemandeFormation + { + Libelle = "Formation C#", + Description = "Demande de formation C# avec WPF", + DemandeRH = false, + DateDemande = new DateTime(2020, 5, 22, 9, 0, 0), + Etat = EtatDemande.Validee, + CommentaireRefus = null, + DateDerniereReponse = null, + Ep = ep12 + }; + + epContext.DemandeFormation.Add(d5); + + d6 = new DemandeFormation + { + Libelle = "Formation Vb.Net", + Description = "Demande de formation Vb.Net avec WinForms", + DemandeRH = false, + DateDemande = new DateTime(2020, 6, 22, 9, 0, 0), + Etat = EtatDemande.Validee, + CommentaireRefus = null, + DateDerniereReponse = null, + Ep = ep15 + }; + + epContext.DemandeFormation.Add(d6); + + d7 = new DemandeFormation + { + Libelle = "Formation Vb.Net", + Description = "Demande de formation Vb.Net avec WinForms", + DemandeRH = false, + DateDemande = new DateTime(2020, 7, 22, 9, 0, 0), + Etat = EtatDemande.Validee, + CommentaireRefus = null, + DateDerniereReponse = null, + Ep = ep16 + }; + + epContext.DemandeFormation.Add(d7); + + d8 = new DemandeFormation + { + Libelle = "Formation SQL", + Description = "Demande de formation SQL avec SQL Server", + DemandeRH = false, + DateDemande = new DateTime(2020, 8, 22, 9, 0, 0), + Etat = EtatDemande.Validee, + CommentaireRefus = null, + DateDerniereReponse = null, + Ep = ep16 + }; + + epContext.DemandeFormation.Add(d8); + + d9 = new DemandeFormation + { + Libelle = "Formation PHP", + Description = "Demande de formation PHP avec Laravel", + DemandeRH = false, + DateDemande = new DateTime(2020, 9, 22, 9, 0, 0), + Etat = EtatDemande.Rejetee, + CommentaireRefus = "Aucune formation PHP pour le moment", + DateDerniereReponse = new DateTime(2020, 9, 27, 9, 0, 0), + Ep = ep17 + }; + + epContext.DemandeFormation.Add(d9); + + d10 = new DemandeFormation + { + Libelle = "Formation Vue.JS", + Description = "Demande de formation Vue.JS", + DemandeRH = false, + DateDemande = new DateTime(2020, 10, 22, 9, 0, 0), + Etat = EtatDemande.Rejetee, + CommentaireRefus = null, + DateDerniereReponse = new DateTime(2020, 10, 27, 9, 0, 0), + Ep = ep18 + }; + + epContext.DemandeFormation.Add(d10); + + d11 = new DemandeFormation + { + Libelle = "Formation SCRUM", + Description = "Demande de formation sur la méthode agile SCRUM", + DemandeRH = false, + DateDemande = new DateTime(2020, 11, 22, 9, 0, 0), + Etat = EtatDemande.Rejetee, + CommentaireRefus = null, + DateDerniereReponse = new DateTime(2020, 11, 27, 9, 0, 0), + Ep = ep19 + }; + + epContext.DemandeFormation.Add(d11); + + d12 = new DemandeFormation + { + Libelle = "Formation C#", + Description = "Demande de formation C# avec Xamarin", + DemandeRH = false, + DateDemande = new DateTime(2020, 12, 22, 9, 0, 0), + Etat = EtatDemande.Rejetee, + CommentaireRefus = null, + DateDerniereReponse = new DateTime(2020, 12, 27, 9, 0, 0), + Ep = ep20 + }; + + epContext.DemandeFormation.Add(d12); + + // Participation formation + + ParticipationFormation p1, p2, p3, p4; + ParticipationFormation p5, p6, p7, p8; + ParticipationFormation p9, p10, p11, p12; + + + p1 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 1, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d1.IdDemandeFormation, + DemandeFormation = d1, + Formation = f1 + }; + epContext.ParticipationFormation.Add(p1); + + p2 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 2, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d2.IdDemandeFormation, + DemandeFormation = d2, + Formation = f2 + }; + epContext.ParticipationFormation.Add(p2); + + p3 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 3, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d3.IdDemandeFormation, + DemandeFormation = d3, + Formation = f3 + }; + epContext.ParticipationFormation.Add(p3); + + p4 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 4, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d4.IdDemandeFormation, + DemandeFormation = d4, + Formation = f3 + }; + epContext.ParticipationFormation.Add(p4); + + p5 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 5, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d5.IdDemandeFormation, + DemandeFormation = d5, + Formation = f3 + }; + epContext.ParticipationFormation.Add(p5); + + p6 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 6, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d6.IdDemandeFormation, + DemandeFormation = d6, + Formation = f4 + }; + epContext.ParticipationFormation.Add(p6); + + p7 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 7, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d7.IdDemandeFormation, + DemandeFormation = d7, + Formation = f4 + }; + epContext.ParticipationFormation.Add(p7); + + p8 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 8, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d8.IdDemandeFormation, + DemandeFormation = d8, + Formation = f5 + }; + epContext.ParticipationFormation.Add(p8); + + p9 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 9, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d9.IdDemandeFormation, + DemandeFormation = d9, + Formation = f6 + }; + epContext.ParticipationFormation.Add(p9); + + p10 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 10, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d10.IdDemandeFormation, + DemandeFormation = d10, + Formation = f7 + }; + epContext.ParticipationFormation.Add(p10); + + p11 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 11, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d11.IdDemandeFormation, + DemandeFormation = d11, + Formation = f8 + }; + epContext.ParticipationFormation.Add(p11); + + p12 = new ParticipationFormation + { + DateCreation = new DateTime(2020, 12, 25, 9, 0, 0), + EstEvaluee = false, + IdDemandeFormation = d12.IdDemandeFormation, + DemandeFormation = d12, + Formation = f9 + }; + epContext.ParticipationFormation.Add(p12); + + epContext.SaveChanges(); } + /// + /// Insère un jeu de données fictif pour les demandes de formation + /// + /// + public static void AddDemandesFormation(EpContext epContext) + { + + } + /// /// Insère un jeu de données fictif pour les champs ///