You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2305 lines
93 KiB
2305 lines
93 KiB
using EPAServeur.Models.EP;
|
|
using EPAServeur.Models.Formation;
|
|
using EPAServeur.Models.Notes;
|
|
using EPAServeur.Models.SaisieChamp;
|
|
using IO.Swagger.Enum;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace EPAServeur.Context
|
|
{
|
|
/// <summary>
|
|
/// Classe permettant d'insérer des données dans la base de données.
|
|
/// </summary>
|
|
public class DataSeeder
|
|
{
|
|
/// <summary>
|
|
/// Insère des informations qui pourront être conservées dans la base de données
|
|
/// </summary>
|
|
/// <param name="epContext"></param>
|
|
public static void AddInformationsDeBase(EpContext epContext)
|
|
{
|
|
|
|
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)
|
|
//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
|
|
}
|
|
|
|
/// <summary>
|
|
/// Insère des thèmes qui pourront être ajoutés et conservés
|
|
/// </summary>
|
|
/// <param name="epContext"></param>
|
|
//public static void AddThemes(EpContext epContext)
|
|
//{
|
|
// Theme management, securite, developpement, gestionprojet;
|
|
|
|
// management = new Theme { Libelle = "Management" };
|
|
// epContext.Theme.Add(management);
|
|
|
|
// securite = new Theme { Libelle = "Sécurité" };
|
|
// epContext.Theme.Add(securite);
|
|
|
|
// developpement = new Theme { Libelle = "Développement" };
|
|
// epContext.Theme.Add(developpement);
|
|
|
|
// gestionprojet = new Theme { Libelle = "Gestion de projet" };
|
|
// epContext.Theme.Add(gestionprojet);
|
|
|
|
// epContext.SaveChanges();
|
|
//}
|
|
|
|
/// <summary>
|
|
/// Insère un jeu de données fictif pour les types d'entretien
|
|
/// </summary>
|
|
/// <param name="epContext"></param>
|
|
public static void AddTypesEntretien(EpContext epContext)
|
|
{
|
|
//TypeEntretien
|
|
TypeEntretien typeSite, typeClient, typeVisio, typeTelephone;
|
|
|
|
typeSite = new TypeEntretien { IdTypeEntretien = 1, Libelle = "Sur site" };
|
|
epContext.TypeEntretien.Add(typeSite);
|
|
|
|
typeClient = new TypeEntretien { IdTypeEntretien = 2, Libelle = "Chez le client" };
|
|
epContext.TypeEntretien.Add(typeClient);
|
|
|
|
typeVisio = new TypeEntretien { IdTypeEntretien = 3, Libelle = "Visioconférence" };
|
|
epContext.TypeEntretien.Add(typeVisio);
|
|
|
|
typeTelephone = new TypeEntretien { IdTypeEntretien = 4, Libelle = "Téléphonique" };
|
|
epContext.TypeEntretien.Add(typeTelephone);
|
|
|
|
epContext.SaveChanges();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Insère un jeu de données fictif pour les ep
|
|
/// </summary>
|
|
/// <param name="epContext"></param>
|
|
public static void AddEp(EpContext epContext)
|
|
{
|
|
TypeEntretien typeSite, typeClient, typeVisio, typeTelephone;
|
|
typeSite = epContext.TypeEntretien.Find((long)1);
|
|
typeClient = epContext.TypeEntretien.Find((long)2);
|
|
typeVisio = epContext.TypeEntretien.Find((long)3);
|
|
typeTelephone = epContext.TypeEntretien.Find((long)4);
|
|
|
|
Engagement eg1, eg2, eg3, eg4;
|
|
ParticipationEP p1, p2, p3, p4, p5;
|
|
CommentaireAssistant ca1, ca2, ca3;
|
|
DemandeDelegation dm1, dm2, dm3;
|
|
RdvEntretien rdv1, rdv2, rdv3;
|
|
|
|
RdvEntretien proposition1, proposition2, proposition3;
|
|
|
|
ChoixTypeEntretien choix1, choix2, choix3, choix4, choix5, choix6, choix7;
|
|
|
|
Objectif objectif1, objectif2, objectif3, objectif4, objectif5, objectif6, objectif7, objectif8, objectif9;
|
|
|
|
ObjectifPrecedent objectifPrecedent1, objectifPrecedent2, objectifPrecedent3, objectifPrecedent4, objectifPrecedent5, objectifPrecedent6;
|
|
|
|
|
|
//Ep en cours
|
|
Ep epEnCours1, epEnCours2, epEnCours3, epEnCours4, epEnCours5, epEnCours6, epEnCours7, epEnCours8, epEnCours9;
|
|
|
|
|
|
epEnCours1 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2021, 1, 15),
|
|
DatePrevisionnelle = new DateTime(2021, 3, 10),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
Statut = StatutEp.Disponible,
|
|
IdBu = 1,
|
|
IdReferent = new Guid("56e3d82d-4be4-4449-a1f7-b4004b6bd186"),
|
|
IdCollaborateur = new Guid("301ba7f3-095e-4912-8998-a7c942dc5f23"),
|
|
Obligatoire = true,
|
|
};
|
|
epContext.Ep.Add(epEnCours1);
|
|
|
|
epEnCours2 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2021, 1, 17),
|
|
DatePrevisionnelle = new DateTime(2021, 3, 16),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
Statut = StatutEp.DatesProposees,
|
|
IdBu = 1,
|
|
IdReferent = new Guid("3f276ab8-727a-4e26-ad5d-4d296158688e"),
|
|
IdCollaborateur = new Guid("e7820f92-eab1-42f5-ae96-5c16e71ff1e6"),
|
|
Obligatoire = false,
|
|
};
|
|
ca1 = new CommentaireAssistant()
|
|
{
|
|
Commentaire = "Commentaire assistant",
|
|
IdAssistant = new Guid("a43b6f4f-f199-4dd0-93b6-a1cb2c0a0d14"),
|
|
Ep = epEnCours2
|
|
};
|
|
ca2 = new CommentaireAssistant()
|
|
{
|
|
Commentaire = "Commentaire assistant",
|
|
IdAssistant = new Guid("a29d707c-5d82-4c48-bed1-a6d1c1710047"),
|
|
Ep = epEnCours2
|
|
};
|
|
epEnCours2.CommentairesAssistant = new List<CommentaireAssistant>(new[] { ca1, ca2 });
|
|
dm1 = new DemandeDelegation()
|
|
{
|
|
DateDemande = DateTime.Now,
|
|
Ep = epEnCours1,
|
|
IdReferent = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
EtatDemande = EtatDemande.EnAttente,
|
|
RaisonDemande = "Raison quelconque 1"
|
|
};
|
|
epEnCours2.DemandeDelegation = dm1;
|
|
|
|
rdv1 = new RdvEntretien()
|
|
{
|
|
IdRdvEntretien = 1,
|
|
DateEntretien = new DateTime(),
|
|
EpChoixRDV = epEnCours2,
|
|
TypeEntretien = typeClient,
|
|
EpProposition = epEnCours2
|
|
};
|
|
|
|
epEnCours2.RdvEntretien = rdv1;
|
|
proposition1 = new RdvEntretien()
|
|
{
|
|
DateEntretien = new DateTime(),
|
|
EpProposition = epEnCours2,
|
|
IdRdvEntretien = 2,
|
|
TypeEntretien = typeSite
|
|
};
|
|
proposition2 = new RdvEntretien()
|
|
{
|
|
DateEntretien = new DateTime(),
|
|
EpProposition = epEnCours2,
|
|
IdRdvEntretien = 3,
|
|
TypeEntretien = typeVisio
|
|
};
|
|
epEnCours2.PropositionsRDV = new List<RdvEntretien>(new[] { rdv1, proposition1, proposition2 });
|
|
|
|
choix1 = new ChoixTypeEntretien()
|
|
{
|
|
Ep = epEnCours2,
|
|
Ordre = 0,
|
|
TypeEntretien = typeClient
|
|
};
|
|
|
|
choix2 = new ChoixTypeEntretien()
|
|
{
|
|
Ep = epEnCours2,
|
|
Ordre = 1,
|
|
TypeEntretien = typeSite
|
|
};
|
|
|
|
choix3 = new ChoixTypeEntretien()
|
|
{
|
|
Ep = epEnCours2,
|
|
Ordre = 2,
|
|
TypeEntretien = typeVisio
|
|
};
|
|
choix4 = new ChoixTypeEntretien()
|
|
{
|
|
Ep = epEnCours2,
|
|
Ordre = 3,
|
|
TypeEntretien = typeTelephone
|
|
};
|
|
epEnCours2.ChoixTypeEntretien = new List<ChoixTypeEntretien>() { choix1, choix2, choix3, choix4 };
|
|
epContext.Ep.Add(epEnCours2);
|
|
|
|
|
|
epEnCours3 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2021, 1, 17),
|
|
DatePrevisionnelle = new DateTime(2021, 3, 20),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPS,
|
|
Statut = StatutEp.Effectue,
|
|
IdBu = 1,
|
|
IdReferent = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
IdCollaborateur = new Guid("b5254c6c-7caa-435f-a4bb-e0cf92559832"),
|
|
Obligatoire = false,
|
|
};
|
|
|
|
p1 = new ParticipationEP()
|
|
{
|
|
Ep = epEnCours3,
|
|
IdParticipant = new Guid("eb8b0f33-f529-4985-861e-1207f3312bb5"),
|
|
EstPermanente = false
|
|
};
|
|
p2 = new ParticipationEP()
|
|
{
|
|
Ep = epEnCours3,
|
|
IdParticipant = new Guid("d4fc247b-015a-44d6-8f3e-a52f0902d2bf"),
|
|
EstPermanente = false
|
|
};
|
|
epEnCours3.Participants = new List<ParticipationEP>(new[] { p1, p2 });
|
|
|
|
objectif1 = new Objectif() { Ep = epEnCours3, Libelle = "Objectif1" };
|
|
objectif2 = new Objectif() { Ep = epEnCours3, Libelle = "Objectif2" };
|
|
objectif3 = new Objectif() { Ep = epEnCours3, Libelle = "Objectif3" };
|
|
|
|
objectifPrecedent1 = new ObjectifPrecedent() { Ep = epEnCours3, Libelle = "ObjectifPrec1", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.Atteint };
|
|
objectifPrecedent2 = new ObjectifPrecedent() { Ep = epEnCours3, Libelle = "ObjectifPrec2", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.Partiel };
|
|
objectifPrecedent3 = new ObjectifPrecedent() { Ep = epEnCours3, Libelle = "ObjectifPrec3", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.Partiel };
|
|
epEnCours3.Objectifs = new List<Objectif>() { objectif1, objectif2, objectif3 };
|
|
epEnCours3.ObjectifsPrecedents = new List<ObjectifPrecedent>() { objectifPrecedent1, objectifPrecedent2, objectifPrecedent3 };
|
|
|
|
|
|
|
|
|
|
epContext.Ep.Add(epEnCours3);
|
|
|
|
epEnCours4 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2021, 1, 20),
|
|
DatePrevisionnelle = new DateTime(2021, 3, 8),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPS,
|
|
Statut = StatutEp.DatesProposees,
|
|
IdBu = 2,
|
|
IdReferent = new Guid("eb8b0f33-f529-4985-861e-1207f3312bb5"),
|
|
IdCollaborateur = new Guid("a0f40e2a-cc03-4032-a627-5389e1281c64"),
|
|
Obligatoire = false,
|
|
};
|
|
dm2 = new DemandeDelegation()
|
|
{
|
|
DateDemande = DateTime.Now,
|
|
Ep = epEnCours4,
|
|
IdReferent = new Guid("d4fc247b-015a-44d6-8f3e-a52f0902d2bf"),
|
|
EtatDemande = EtatDemande.EnAttente,
|
|
RaisonDemande = "Raison quelconque 2"
|
|
};
|
|
epEnCours4.DemandeDelegation = dm2;
|
|
|
|
choix5 = new ChoixTypeEntretien()
|
|
{
|
|
Ep = epEnCours4,
|
|
Ordre = 0,
|
|
TypeEntretien = typeSite
|
|
};
|
|
|
|
epEnCours4.ChoixTypeEntretien = new List<ChoixTypeEntretien>() { choix5 };
|
|
|
|
epContext.Ep.Add(epEnCours4);
|
|
|
|
epEnCours5 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2021, 1, 20),
|
|
DatePrevisionnelle = new DateTime(2021, 3, 22),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPS,
|
|
Statut = StatutEp.AttenteEntretien,
|
|
IdBu = 2,
|
|
IdReferent = new Guid("d4fc247b-015a-44d6-8f3e-a52f0902d2bf"),
|
|
IdCollaborateur = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"),
|
|
Obligatoire = true,
|
|
};
|
|
|
|
|
|
p3 = new ParticipationEP()
|
|
{
|
|
Ep = epEnCours5,
|
|
IdParticipant = new Guid("d4fc247b-015a-44d6-8f3e-a52f0902d2bf"),
|
|
EstPermanente = false
|
|
};
|
|
epEnCours5.Participants = new List<ParticipationEP>(new[] { p3 });
|
|
|
|
rdv2 = new RdvEntretien()
|
|
{
|
|
DateEntretien = new DateTime(),
|
|
EpProposition = epEnCours5,
|
|
IdRdvEntretien = 4,
|
|
TypeEntretien = typeSite,
|
|
EpChoixRDV = epEnCours5
|
|
};
|
|
|
|
proposition3 = new RdvEntretien()
|
|
{
|
|
DateEntretien = new DateTime(),
|
|
EpProposition = epEnCours5,
|
|
IdRdvEntretien = 5,
|
|
TypeEntretien = typeVisio
|
|
};
|
|
|
|
|
|
|
|
epEnCours5.PropositionsRDV = new List<RdvEntretien>(new[] { rdv2, proposition3 });
|
|
epEnCours5.RdvEntretien = rdv2;
|
|
|
|
choix6 = new ChoixTypeEntretien()
|
|
{
|
|
Ep = epEnCours5,
|
|
Ordre = 0,
|
|
TypeEntretien = typeSite
|
|
};
|
|
|
|
|
|
choix7 = new ChoixTypeEntretien()
|
|
{
|
|
Ep = epEnCours5,
|
|
Ordre = 1,
|
|
TypeEntretien = typeVisio
|
|
};
|
|
|
|
epEnCours5.ChoixTypeEntretien = new List<ChoixTypeEntretien>() { choix6, choix7 };
|
|
epContext.Ep.Add(epEnCours5);
|
|
|
|
epEnCours6 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2021, 1, 24),
|
|
DatePrevisionnelle = new DateTime(2021, 2, 24),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPS,
|
|
Statut = StatutEp.SignatureReferent,
|
|
IdBu = 2,
|
|
IdReferent = new Guid("eb8b0f33-f529-4985-861e-1207f3312bb5"),
|
|
IdCollaborateur = new Guid("de98a866-736f-4295-a669-92a8694e2ee3"),
|
|
Obligatoire = false,
|
|
};
|
|
eg1 = new Engagement()
|
|
{
|
|
Action = "action",
|
|
DateLimite = DateTime.Now,
|
|
Dispositif = "dispositif",
|
|
EtatEngagement = EtatEngagement.EnAttente,
|
|
Modalite = "modalite",
|
|
Ep = epEnCours6
|
|
};
|
|
eg2 = new Engagement()
|
|
{
|
|
Action = "action",
|
|
DateLimite = DateTime.Now,
|
|
Dispositif = "dispositif",
|
|
EtatEngagement = EtatEngagement.EnAttente,
|
|
Modalite = "modalite",
|
|
Ep = epEnCours6
|
|
};
|
|
eg3 = new Engagement()
|
|
{
|
|
Action = "action",
|
|
DateLimite = DateTime.Now,
|
|
Dispositif = "dispositif",
|
|
EtatEngagement = EtatEngagement.EnAttente,
|
|
Modalite = "modalite",
|
|
Ep = epEnCours6
|
|
};
|
|
epEnCours6.Engagements = new List<Engagement>();
|
|
epEnCours6.Engagements.Add(eg1);
|
|
epEnCours6.Engagements.Add(eg2);
|
|
epEnCours6.Engagements.Add(eg3);
|
|
epContext.Ep.Add(epEnCours6);
|
|
|
|
epEnCours7 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2021, 1, 24),
|
|
DatePrevisionnelle = new DateTime(2021, 2, 24),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
Statut = StatutEp.SignatureReferent,
|
|
IdBu = 3,
|
|
IdReferent = new Guid("b799a9de-7743-435e-933f-7f730affc5ae"),
|
|
IdCollaborateur = new Guid("4f3fcd23-a1e4-4c9e-afa2-d06ca9216491"),
|
|
Obligatoire = false,
|
|
};
|
|
objectif4 = new Objectif() { Ep = epEnCours7, Libelle = "Objectif4" };
|
|
objectif5 = new Objectif() { Ep = epEnCours7, Libelle = "Objectif5" };
|
|
objectif6 = new Objectif() { Ep = epEnCours7, Libelle = "Objectif6" };
|
|
|
|
epEnCours7.Objectifs = new List<Objectif>() { objectif4, objectif5, objectif6 };
|
|
epContext.Ep.Add(epEnCours7);
|
|
|
|
epEnCours8 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2021, 2, 13),
|
|
DatePrevisionnelle = new DateTime(2021, 3, 13),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
Statut = StatutEp.Disponible,
|
|
IdBu = 3,
|
|
IdReferent = new Guid("ea027734-ff0f-4308-8879-133a09fb3c46"),
|
|
IdCollaborateur = new Guid("0968ccd3-1ef5-4041-83f3-1c76afb02bbf"),
|
|
Obligatoire = true,
|
|
};
|
|
epContext.Ep.Add(epEnCours8);
|
|
dm3 = new DemandeDelegation()
|
|
{
|
|
DateDemande = DateTime.Now,
|
|
Ep = epEnCours8,
|
|
IdReferent = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
EtatDemande = EtatDemande.EnAttente,
|
|
RaisonDemande = "Raison quelconque 3"
|
|
};
|
|
epEnCours8.DemandeDelegation = dm3;
|
|
|
|
epEnCours9 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2021, 2, 13),
|
|
DatePrevisionnelle = new DateTime(2021, 3, 13),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
Statut = StatutEp.Disponible,
|
|
IdBu = 3,
|
|
IdReferent = new Guid("80220063-a5fa-472b-b610-2e350566df98"),
|
|
IdCollaborateur = new Guid("13fbe621-1bc9-4f04-afde-b54ca076e239"),
|
|
Obligatoire = true,
|
|
};
|
|
|
|
epContext.Ep.Add(epEnCours9);
|
|
|
|
|
|
|
|
|
|
//Ep signés
|
|
Ep epSigne1, epSigne2, epSigne3, epSigne4, epSigne5, epSigne6, epSigne7, epSigne8, epSigne9;
|
|
epSigne1 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2017, 1, 15),
|
|
DatePrevisionnelle = new DateTime(2017, 3, 10),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
Statut = StatutEp.Signe,
|
|
IdBu = 1,
|
|
IdReferent = new Guid("56e3d82d-4be4-4449-a1f7-b4004b6bd186"),
|
|
IdCollaborateur = new Guid("301ba7f3-095e-4912-8998-a7c942dc5f23"),
|
|
Obligatoire = true,
|
|
};
|
|
eg4 = new Engagement()
|
|
{
|
|
Action = "action",
|
|
DateLimite = DateTime.Now,
|
|
Dispositif = "dispositif",
|
|
EtatEngagement = EtatEngagement.EnAttente,
|
|
Modalite = "modalite",
|
|
Ep = epSigne1
|
|
};
|
|
epSigne1.Engagements = new List<Engagement>();
|
|
epSigne1.Engagements.Add(eg4);
|
|
|
|
objectif7 = new Objectif() { Ep = epSigne1, Libelle = "Objectif7" };
|
|
objectif8 = new Objectif() { Ep = epSigne1, Libelle = "Objectif8" };
|
|
objectif9 = new Objectif() { Ep = epSigne1, Libelle = "Objectif9" };
|
|
|
|
objectifPrecedent4 = new ObjectifPrecedent() { Ep = epSigne1, Libelle = "ObjectifPrec4", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.NonAtteint };
|
|
objectifPrecedent5 = new ObjectifPrecedent() { Ep = epSigne1, Libelle = "ObjectifPrec5", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.NonAtteint };
|
|
objectifPrecedent6 = new ObjectifPrecedent() { Ep = epSigne1, Libelle = "ObjectifPrec6", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.Atteint };
|
|
epSigne1.Objectifs = new List<Objectif>() { objectif7, objectif8, objectif9 };
|
|
epSigne1.ObjectifsPrecedents = new List<ObjectifPrecedent>() { objectifPrecedent4, objectifPrecedent6, objectifPrecedent5 };
|
|
|
|
epContext.Ep.Add(epSigne1);
|
|
|
|
epSigne2 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2018, 1, 17),
|
|
DatePrevisionnelle = new DateTime(2018, 3, 16),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
Statut = StatutEp.Signe,
|
|
IdBu = 1,
|
|
IdReferent = new Guid("3f276ab8-727a-4e26-ad5d-4d296158688e"),
|
|
IdCollaborateur = new Guid("e7820f92-eab1-42f5-ae96-5c16e71ff1e6"),
|
|
Obligatoire = false,
|
|
};
|
|
p4 = new ParticipationEP()
|
|
{
|
|
Ep = epSigne2,
|
|
IdParticipant = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
EstPermanente = false
|
|
};
|
|
p5 = new ParticipationEP()
|
|
{
|
|
Ep = epSigne2,
|
|
IdParticipant = new Guid("eb8b0f33-f529-4985-861e-1207f3312bb5"),
|
|
EstPermanente = false
|
|
};
|
|
epSigne2.Participants = new List<ParticipationEP>(new[] { p4, p5 });
|
|
epContext.Ep.Add(epSigne2);
|
|
|
|
|
|
epSigne3 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2019, 1, 17),
|
|
DatePrevisionnelle = new DateTime(2019, 3, 20),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPS,
|
|
Statut = StatutEp.Signe,
|
|
IdBu = 1,
|
|
IdReferent = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
IdCollaborateur = new Guid("b5254c6c-7caa-435f-a4bb-e0cf92559832"),
|
|
Obligatoire = false,
|
|
};
|
|
|
|
rdv3 = new RdvEntretien()
|
|
{
|
|
IdRdvEntretien = 6,
|
|
TypeEntretien = typeVisio,
|
|
DateEntretien = new DateTime(),
|
|
EpChoixRDV = epSigne3
|
|
};
|
|
|
|
epSigne3.RdvEntretien = rdv3;
|
|
epContext.Ep.Add(epSigne3);
|
|
|
|
|
|
|
|
|
|
epSigne4 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2017, 1, 20),
|
|
DatePrevisionnelle = new DateTime(2017, 3, 8),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPS,
|
|
Statut = StatutEp.Signe,
|
|
IdBu = 2,
|
|
IdReferent = new Guid("eb8b0f33-f529-4985-861e-1207f3312bb5"),
|
|
IdCollaborateur = new Guid("a0f40e2a-cc03-4032-a627-5389e1281c64"),
|
|
Obligatoire = false,
|
|
};
|
|
epContext.Ep.Add(epSigne4);
|
|
|
|
epSigne5 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2018, 1, 20),
|
|
DatePrevisionnelle = new DateTime(2018, 3, 22),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPS,
|
|
Statut = StatutEp.Signe,
|
|
IdBu = 2,
|
|
IdReferent = new Guid("d4fc247b-015a-44d6-8f3e-a52f0902d2bf"),
|
|
IdCollaborateur = new Guid("a0f40e2a-cc03-4032-a627-5389e1281c64"),
|
|
Obligatoire = true,
|
|
};
|
|
epContext.Ep.Add(epSigne5);
|
|
|
|
epSigne6 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2020, 1, 24),
|
|
DatePrevisionnelle = new DateTime(2020, 2, 24),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPS,
|
|
Statut = StatutEp.Signe,
|
|
IdBu = 2,
|
|
IdReferent = new Guid("eb8b0f33-f529-4985-861e-1207f3312bb5"),
|
|
IdCollaborateur = new Guid("a0f40e2a-cc03-4032-a627-5389e1281c64"),
|
|
Obligatoire = false,
|
|
};
|
|
|
|
epContext.Ep.Add(epSigne6);
|
|
|
|
epSigne7 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2019, 1, 24),
|
|
DatePrevisionnelle = new DateTime(2019, 2, 24),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
Statut = StatutEp.Signe,
|
|
IdBu = 3,
|
|
IdReferent = new Guid("b799a9de-7743-435e-933f-7f730affc5ae"),
|
|
IdCollaborateur = new Guid("13fbe621-1bc9-4f04-afde-b54ca076e239"),
|
|
Obligatoire = false,
|
|
};
|
|
ca3 = new CommentaireAssistant()
|
|
{
|
|
Commentaire = "Commentaire assistant",
|
|
IdAssistant = new Guid("e6255f16-bcaf-48ac-b00b-97de83677ad8"),
|
|
Ep = epSigne7
|
|
};
|
|
epSigne7.CommentairesAssistant = new List<CommentaireAssistant>();
|
|
epSigne7.CommentairesAssistant.Add(ca3);
|
|
epContext.Ep.Add(epSigne7);
|
|
|
|
epSigne8 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2020, 2, 13),
|
|
DatePrevisionnelle = new DateTime(2020, 3, 13),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
Statut = StatutEp.Signe,
|
|
IdBu = 3,
|
|
IdReferent = new Guid("ea027734-ff0f-4308-8879-133a09fb3c46"),
|
|
IdCollaborateur = new Guid("13fbe621-1bc9-4f04-afde-b54ca076e239"),
|
|
Obligatoire = true,
|
|
};
|
|
epContext.Ep.Add(epSigne8);
|
|
|
|
epSigne9 = new Ep()
|
|
{
|
|
DateDisponibilite = new DateTime(2019, 2, 13),
|
|
DatePrevisionnelle = new DateTime(2019, 3, 13),
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
Statut = StatutEp.Signe,
|
|
IdBu = 3,
|
|
IdReferent = new Guid("80220063-a5fa-472b-b610-2e350566df98"),
|
|
IdCollaborateur = new Guid("13fbe621-1bc9-4f04-afde-b54ca076e239"),
|
|
Obligatoire = true,
|
|
};
|
|
epContext.Ep.Add(epSigne9);
|
|
|
|
epContext.SaveChanges();
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// Insère un jeu de données fictif pour les engagements
|
|
/// </summary>
|
|
/// <param name="epContext"></param>
|
|
public static void AddEngagements(EpContext epContext)
|
|
{
|
|
Ep ep9, ep10, ep11;
|
|
|
|
ep9 = new Ep
|
|
{
|
|
IdEP = 9,
|
|
IdCollaborateur = Guid.Parse("842650db-a548-4472-a3af-4c5fff3c1ab8"),
|
|
IdReferent = Guid.Parse("aa36f34c-9041-42f5-9db3-6536fe7f1696"),
|
|
IdBu = 2,
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2020, 7, 7),
|
|
DateDisponibilite = new DateTime(2020, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2020, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 7, 20)
|
|
};
|
|
epContext.Ep.Add(ep9);
|
|
|
|
ep10 = new Ep
|
|
{
|
|
IdEP = 10,
|
|
IdCollaborateur = Guid.Parse("301ba7f3-095e-4912-8998-a7c942dc5f23"),
|
|
IdReferent = Guid.Parse("ea027734-ff0f-4308-8879-133a09fb3c46"),
|
|
IdBu = 1,
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPS,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2020, 6, 1),
|
|
DatePrevisionnelle = new DateTime(2020, 9, 25),
|
|
DateDisponibilite = new DateTime(2020, 8, 10),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 10, 5)
|
|
};
|
|
epContext.Ep.Add(ep10);
|
|
|
|
ep11 = new Ep
|
|
{
|
|
IdEP = 11,
|
|
IdCollaborateur = Guid.Parse("a0f40e2a-cc03-4032-a627-5389e1281c64"),
|
|
IdReferent = Guid.Parse("c199024f-5960-4c11-8e34-f9947d589284"),
|
|
IdBu = 2,
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2020, 10, 15),
|
|
DatePrevisionnelle = new DateTime(2020, 12, 4),
|
|
DateDisponibilite = new DateTime(2020, 10,30),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.SignatureReferent,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 12, 10)
|
|
};
|
|
epContext.Ep.Add(ep11);
|
|
|
|
Engagement engagement1, engagement2, engagement3; // EnAttente
|
|
Engagement engagement4, engagement5, engagement6; // Respecte
|
|
Engagement engagement7, engagement8, engagement9; // NonRealisable
|
|
Engagement engagement10, engagement11, engagement12; // DateLimitePassee
|
|
|
|
engagement1 = new Engagement
|
|
{
|
|
IdEngagement = 1,
|
|
Action = "Je m'engage à trouver une formation sur l'Asp.Net Core.",
|
|
Dispositif = "Demande de formation RH.",
|
|
Modalite = "Sur temps de travail",
|
|
DateLimite = new DateTime(2020, 9, 1),
|
|
EtatEngagement = EtatEngagement.EnAttente,
|
|
RaisonNonRealisable = null,
|
|
Ep = ep9
|
|
};
|
|
epContext.Engagement.Add(engagement1);
|
|
|
|
engagement2 = new Engagement
|
|
{
|
|
IdEngagement = 2,
|
|
Action = "Je m'engage à attribuer une progression salariale.",
|
|
Dispositif = "Demande d'augmentation RH.",
|
|
Modalite = "Hors temps",
|
|
DateLimite = new DateTime(2020, 9, 1),
|
|
EtatEngagement = EtatEngagement.EnAttente,
|
|
RaisonNonRealisable = null,
|
|
Ep = ep9
|
|
};
|
|
epContext.Engagement.Add(engagement2);
|
|
|
|
engagement3 = new Engagement
|
|
{
|
|
IdEngagement = 3,
|
|
Action = "Je m'engage à réaliser des points hebdomadaires avec l'équipe pour renforcer le lien social.",
|
|
Dispositif = "Planifier un point hebdomadaire sur Teams.",
|
|
Modalite = "Sur temps de travail",
|
|
DateLimite = new DateTime(2020, 9, 1),
|
|
EtatEngagement = EtatEngagement.EnAttente,
|
|
RaisonNonRealisable = null,
|
|
Ep = ep9
|
|
};
|
|
epContext.Engagement.Add(engagement3);
|
|
|
|
engagement4 = new Engagement
|
|
{
|
|
IdEngagement = 4,
|
|
Action = "Je m'engage à fournir une connexion internet afin que le collaborateur puisse travailler dans de bonnes condition lorsque ce dernier est en télétravail.",
|
|
Dispositif = "Fournir un téléphone portable avec une connexion internet.",
|
|
Modalite = "Hors temps",
|
|
DateLimite = new DateTime(2020, 9, 1),
|
|
EtatEngagement = EtatEngagement.Respecte,
|
|
RaisonNonRealisable = null,
|
|
Ep = ep9
|
|
};
|
|
epContext.Engagement.Add(engagement4);
|
|
|
|
engagement5 = new Engagement
|
|
{
|
|
IdEngagement = 5,
|
|
Action = "Je m'engage à trouver une formation sur la méthode SCRUM.",
|
|
Dispositif = "Demande de formation RH.",
|
|
Modalite = "Sur temps de travail",
|
|
DateLimite = new DateTime(2020, 12, 1),
|
|
EtatEngagement = EtatEngagement.Respecte,
|
|
RaisonNonRealisable = null,
|
|
Ep = ep10
|
|
};
|
|
epContext.Engagement.Add(engagement5);
|
|
|
|
engagement6 = new Engagement
|
|
{
|
|
IdEngagement = 6,
|
|
Action = "Je m'engage à réaliser un point avec le client pour améliorer l'intégration du collaborateur dans l'équipe.",
|
|
Dispositif = "Contacter le client pour planifier un rendez-vous.",
|
|
Modalite = "Sur temps de travail",
|
|
DateLimite = new DateTime(2020, 10, 25),
|
|
EtatEngagement = EtatEngagement.Respecte,
|
|
RaisonNonRealisable = null,
|
|
Ep = ep10
|
|
};
|
|
epContext.Engagement.Add(engagement6);
|
|
|
|
engagement7 = new Engagement
|
|
{
|
|
IdEngagement = 7,
|
|
Action = "Je m'engage à attribuer 5 jours de télétravail pour le collbaorateur en dehors de la période Covid.",
|
|
Dispositif = "Demande RH.",
|
|
Modalite = "Sur temps de travail",
|
|
DateLimite = new DateTime(2020, 12, 1),
|
|
EtatEngagement = EtatEngagement.NonRealisable,
|
|
RaisonNonRealisable = "L'accord du télétravail ne permet pas d'avoir 5 jours de travail pour le Groupe 1.",
|
|
Ep = ep10
|
|
};
|
|
epContext.Engagement.Add(engagement7);
|
|
|
|
engagement8 = new Engagement
|
|
{
|
|
IdEngagement = 8,
|
|
Action = "Je m'engage à attribuer 5 jours de congés supplémentaire.",
|
|
Dispositif = "Demande RH.",
|
|
Modalite = "Sur temps de travail",
|
|
DateLimite = new DateTime(2020, 12, 1),
|
|
EtatEngagement = EtatEngagement.NonRealisable,
|
|
RaisonNonRealisable = "On ne peut pas donner plus de jours de congés que le nombre de droits que le salarié a cotisé.",
|
|
Ep = ep10
|
|
};
|
|
epContext.Engagement.Add(engagement8);
|
|
|
|
engagement9 = new Engagement
|
|
{
|
|
IdEngagement = 9,
|
|
Action = "Je m'engage à augmenter le salaire mensuel du collaborateur de 1000 euros.",
|
|
Dispositif = "Demande RH.",
|
|
Modalite = "Hors temps",
|
|
DateLimite = new DateTime(2021, 1, 31),
|
|
EtatEngagement = EtatEngagement.NonRealisable,
|
|
RaisonNonRealisable = "La demande d'augmentation dépasse le crédit budgétaire.",
|
|
Ep = ep11
|
|
};
|
|
epContext.Engagement.Add(engagement9);
|
|
|
|
engagement10 = new Engagement
|
|
{
|
|
IdEngagement = 10,
|
|
Action = "Je m'engage à interdire le client de conctacter le collaborateur en dehors du temps de travail.",
|
|
Dispositif = "Contacter le client pour planifier un rendez-vous.",
|
|
Modalite = "Hors temps",
|
|
DateLimite = new DateTime(2021, 1, 31),
|
|
EtatEngagement = EtatEngagement.DateLimitePassee,
|
|
RaisonNonRealisable = "La date limite pour respecter l'engagement est passée.",
|
|
Ep = ep11
|
|
};
|
|
epContext.Engagement.Add(engagement10);
|
|
|
|
engagement11 = new Engagement
|
|
{
|
|
IdEngagement = 11,
|
|
Action = "Je m'engage à trouver une formation sur le Cobol.",
|
|
Dispositif = "Demande de formation auprès des RH.",
|
|
Modalite = "Sur temps de travail",
|
|
DateLimite = new DateTime(2021, 1, 31),
|
|
EtatEngagement = EtatEngagement.DateLimitePassee,
|
|
RaisonNonRealisable = "La date limite pour respecter l'engagement est passée.",
|
|
Ep = ep11
|
|
};
|
|
epContext.Engagement.Add(engagement11);
|
|
|
|
engagement12 = new Engagement
|
|
{
|
|
IdEngagement = 12,
|
|
Action = "Je m'engage à fournir une disque dur externe au collaborateur.",
|
|
Dispositif = "Demande de matériel auprès des RH.",
|
|
Modalite = "Sur temps de travail",
|
|
DateLimite = new DateTime(2021, 1, 31),
|
|
EtatEngagement = EtatEngagement.DateLimitePassee,
|
|
RaisonNonRealisable = "La date limite pour respecter l'engagement est passée.",
|
|
Ep = ep11
|
|
};
|
|
epContext.Engagement.Add(engagement12);
|
|
|
|
epContext.SaveChanges();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Insère un jeu de données fictif pour les formations
|
|
/// </summary>
|
|
/// <param name="epContext"></param>
|
|
public static void AddFormations(EpContext epContext)
|
|
{
|
|
//StatutFormation
|
|
StatutFormation statutPlanifie, statutReplanifie, statutRealise, statutAnnule;
|
|
|
|
statutPlanifie = new StatutFormation { IdStatutFormation = 1, Libelle = "Planifiée" };
|
|
epContext.StatutFormation.Add(statutPlanifie);
|
|
|
|
statutReplanifie = new StatutFormation { IdStatutFormation = 2, Libelle = "Replanifiée" };
|
|
epContext.StatutFormation.Add(statutReplanifie);
|
|
|
|
statutRealise = new StatutFormation { IdStatutFormation = 3, Libelle = "Réalisée" };
|
|
epContext.StatutFormation.Add(statutRealise);
|
|
|
|
statutAnnule = new StatutFormation { IdStatutFormation = 4, Libelle = "Annulée" };
|
|
epContext.StatutFormation.Add(statutAnnule);
|
|
|
|
//ModeFormation
|
|
ModeFormation modeExterne, modeInterne, modePresentiel, modeELearning;
|
|
|
|
modeExterne = new ModeFormation { IdModeFormation = 1, Libelle = "Externe" };
|
|
epContext.ModeFormation.Add(modeExterne);
|
|
|
|
modeInterne = new ModeFormation { IdModeFormation = 2, Libelle = "Interne" };
|
|
epContext.ModeFormation.Add(modeInterne);
|
|
|
|
modePresentiel = new ModeFormation { IdModeFormation = 3, Libelle = "Présentiel" };
|
|
epContext.ModeFormation.Add(modePresentiel);
|
|
|
|
modeELearning = new ModeFormation { IdModeFormation = 4, Libelle = "E-learning" };
|
|
epContext.ModeFormation.Add(modeELearning);
|
|
|
|
//TypeFormation
|
|
TypeFormation typeExterne, typeInterne, typeELearning, typeAcademy;
|
|
|
|
typeExterne = new TypeFormation { IdTypeFormation = 1, Libelle = "Externe" };
|
|
epContext.TypeFormation.Add(typeExterne);
|
|
|
|
typeInterne = new TypeFormation { IdTypeFormation = 2, Libelle = "Interne" };
|
|
epContext.TypeFormation.Add(typeInterne);
|
|
|
|
typeELearning = new TypeFormation { IdTypeFormation = 3, Libelle = "E-learning" };
|
|
epContext.TypeFormation.Add(typeELearning);
|
|
|
|
typeAcademy = new TypeFormation { IdTypeFormation = 4, Libelle = "Academy by Apside" };
|
|
epContext.TypeFormation.Add(typeAcademy);
|
|
|
|
//OrigineFormation
|
|
OrigineFormation origineFormationCollaborateur, origineFormationClient, origineFormationApside, origineFormationReglementaire;
|
|
|
|
origineFormationCollaborateur = new OrigineFormation { IdOrigineFormation = 1, Libelle = "Demande collaborateur" };
|
|
epContext.OrigineFormation.Add(origineFormationCollaborateur);
|
|
|
|
origineFormationClient = new OrigineFormation { IdOrigineFormation = 2, Libelle = "Exigence client" };
|
|
epContext.OrigineFormation.Add(origineFormationClient);
|
|
|
|
origineFormationApside = new OrigineFormation { IdOrigineFormation = 3, Libelle = "Exigence Apside" };
|
|
epContext.OrigineFormation.Add(origineFormationApside);
|
|
|
|
origineFormationReglementaire = new OrigineFormation { IdOrigineFormation = 4, Libelle = "Formation réglementaire" };
|
|
epContext.OrigineFormation.Add(origineFormationReglementaire);
|
|
|
|
//OrigineDemandeFormation
|
|
OrigineDemande origineDemandeFormationCollaborateur, origineDemandeFormationEP,
|
|
origineDemandeFormationClient, origineDemandeFormationReglement, origineDemandeFormationApside;
|
|
|
|
origineDemandeFormationCollaborateur = new OrigineDemande { IdOrigineDemande = 1, Libelle = "Demande collaborateur" };
|
|
epContext.OrigineDemandeFormation.Add(origineDemandeFormationCollaborateur);
|
|
|
|
origineDemandeFormationEP = new OrigineDemande { IdOrigineDemande = 2, Libelle = "Demande EP" };
|
|
epContext.OrigineDemandeFormation.Add(origineDemandeFormationEP);
|
|
|
|
origineDemandeFormationClient = new OrigineDemande { IdOrigineDemande = 3, Libelle = "Exigence Client" };
|
|
epContext.OrigineDemandeFormation.Add(origineDemandeFormationClient);
|
|
|
|
origineDemandeFormationReglement = new OrigineDemande { IdOrigineDemande = 4, Libelle = "Formation réglementaire" };
|
|
epContext.OrigineDemandeFormation.Add(origineDemandeFormationReglement);
|
|
|
|
origineDemandeFormationApside = new OrigineDemande { IdOrigineDemande = 5, Libelle = "Demande Apside" };
|
|
epContext.OrigineDemandeFormation.Add(origineDemandeFormationApside);
|
|
|
|
//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<Formation> formations = new List<Formation>();
|
|
|
|
f1 = new Formation
|
|
{
|
|
IdFormation = 1,
|
|
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,
|
|
ModeFormation = modeELearning,
|
|
TypeFormation = typeELearning,
|
|
Organisme = "Organisme1",
|
|
Origine = origineFormationClient,
|
|
Statut = statutPlanifie,
|
|
EstCertifiee = false
|
|
};
|
|
epContext.Formation.Add(f1);
|
|
|
|
f2 = new Formation
|
|
{
|
|
IdFormation = 2,
|
|
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,
|
|
ModeFormation = modeExterne,
|
|
TypeFormation = typeExterne,
|
|
Organisme = "Organisme2",
|
|
Origine = origineFormationClient,
|
|
Statut = statutPlanifie,
|
|
EstCertifiee = false
|
|
};
|
|
epContext.Formation.Add(f2);
|
|
|
|
f3 = new Formation
|
|
{
|
|
IdFormation = 3,
|
|
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,
|
|
ModeFormation = modeELearning,
|
|
TypeFormation = typeELearning,
|
|
Organisme = "Organisme2",
|
|
Origine = origineFormationApside,
|
|
Statut = statutPlanifie,
|
|
EstCertifiee = true
|
|
};
|
|
epContext.Formation.Add(f3);
|
|
|
|
f4 = new Formation
|
|
{
|
|
IdFormation = 4,
|
|
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,
|
|
ModeFormation = modeELearning,
|
|
TypeFormation = typeAcademy,
|
|
Organisme = "Organisme2",
|
|
Origine = origineFormationCollaborateur,
|
|
Statut = statutRealise,
|
|
EstCertifiee = true
|
|
};
|
|
epContext.Formation.Add(f4);
|
|
|
|
f5 = new Formation
|
|
{
|
|
IdFormation = 5,
|
|
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,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeExterne,
|
|
Organisme = "Organisme3",
|
|
Origine = origineFormationClient,
|
|
Statut = statutRealise,
|
|
EstCertifiee = true
|
|
};
|
|
epContext.Formation.Add(f5);
|
|
|
|
f6 = new Formation
|
|
{
|
|
IdFormation = 6,
|
|
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,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeInterne,
|
|
Organisme = "Organisme4",
|
|
Origine = origineFormationClient,
|
|
Statut = statutReplanifie,
|
|
EstCertifiee = false
|
|
};
|
|
epContext.Formation.Add(f6);
|
|
|
|
f7 = new Formation
|
|
{
|
|
IdFormation = 7,
|
|
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,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeInterne,
|
|
Organisme = "Organisme2",
|
|
Origine = origineFormationClient,
|
|
Statut = statutReplanifie,
|
|
EstCertifiee = false
|
|
};
|
|
epContext.Formation.Add(f7);
|
|
|
|
f8 = new Formation
|
|
{
|
|
IdFormation = 8,
|
|
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,
|
|
ModeFormation = modeELearning,
|
|
TypeFormation = typeAcademy,
|
|
Organisme = "Organisme4",
|
|
Origine = origineFormationClient,
|
|
Statut = statutReplanifie,
|
|
EstCertifiee = true
|
|
};
|
|
epContext.Formation.Add(f8);
|
|
|
|
f9 = new Formation
|
|
{
|
|
IdFormation = 9,
|
|
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,
|
|
Heure = 3,
|
|
Jour = 1,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeInterne,
|
|
Organisme = "Organisme3",
|
|
Origine = origineFormationClient,
|
|
Statut = statutReplanifie,
|
|
EstCertifiee = true
|
|
};
|
|
epContext.Formation.Add(f9);
|
|
|
|
f10 = new Formation
|
|
{
|
|
IdFormation = 10,
|
|
Intitule = "Architecture Microservices – Les fondamentaux",
|
|
DateDebut = new DateTime(2020, 8, 3, 14, 0, 0),
|
|
DateFin = new DateTime(2020, 8, 3),
|
|
IdAgence = 1,
|
|
Heure = 2,
|
|
Jour = 1,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeInterne,
|
|
Organisme = "Organisme4",
|
|
Origine = origineFormationReglementaire,
|
|
Statut = statutAnnule,
|
|
EstCertifiee = false
|
|
};
|
|
epContext.Formation.Add(f10);
|
|
|
|
f11 = new Formation
|
|
{
|
|
IdFormation = 11,
|
|
Intitule = "Formation Clean Architecture .Net Core",
|
|
DateDebut = new DateTime(2020, 04, 6, 9, 0, 0),
|
|
DateFin = new DateTime(2020, 04, 11),
|
|
IdAgence = 1,
|
|
Heure = 15,
|
|
Jour = 5,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeInterne,
|
|
Organisme = "Organisme1",
|
|
Origine = origineFormationReglementaire,
|
|
Statut = statutAnnule,
|
|
EstCertifiee = false
|
|
};
|
|
epContext.Formation.Add(f11);
|
|
|
|
/*
|
|
|
|
int[] npParticipants = { };
|
|
*/
|
|
|
|
// EP
|
|
Ep ep12, ep13, ep14, ep15;
|
|
Ep ep16, ep17, ep18, ep19;
|
|
Ep ep20;
|
|
|
|
ep12 = new Ep
|
|
{
|
|
IdEP = 12,
|
|
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),
|
|
DateDisponibilite = new DateTime(2019, 12, 23),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.SignatureReferent,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 1, 23)
|
|
};
|
|
epContext.Ep.Add(ep12);
|
|
|
|
ep13 = new Ep
|
|
{
|
|
IdEP = 13,
|
|
IdCollaborateur = Guid.Parse("301ba7f3-095e-4912-8998-a7c942dc5f23"),
|
|
IdReferent = Guid.Parse("ea027734-ff0f-4308-8879-133a09fb3c46"),
|
|
IdBu = 1,
|
|
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),
|
|
DateDisponibilite = new DateTime(2020, 1, 6),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 2, 23)
|
|
};
|
|
epContext.Ep.Add(ep13);
|
|
|
|
ep14 = new Ep
|
|
{
|
|
IdEP = 14,
|
|
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),
|
|
DateDisponibilite = new DateTime(2020, 2, 25),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.SignatureReferent,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 3, 23)
|
|
};
|
|
|
|
epContext.Ep.Add(ep14);
|
|
|
|
ep15 = new Ep
|
|
{
|
|
IdEP = 15,
|
|
IdCollaborateur = Guid.Parse("4f3fcd23-a1e4-4c9e-afa2-d06ca9216491"),
|
|
IdReferent = Guid.Parse("25d2b0ce-5c95-4ccc-98bb-63b06c4ee4ad"),
|
|
IdBu = 3,
|
|
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),
|
|
DateDisponibilite = new DateTime(2020, 3, 25),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.SignatureReferent,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 4, 23)
|
|
};
|
|
|
|
ep16 = new Ep
|
|
{
|
|
IdEP = 16,
|
|
IdCollaborateur = Guid.Parse("0968ccd3-1ef5-4041-83f3-1c76afb02bbf"),
|
|
IdReferent = Guid.Parse("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
IdBu = 3,
|
|
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),
|
|
DateDisponibilite = new DateTime(2020, 4, 25),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.SignatureReferent,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 5, 23)
|
|
};
|
|
|
|
epContext.Ep.Add(ep16);
|
|
|
|
ep17 = new Ep
|
|
{
|
|
IdEP = 17,
|
|
IdCollaborateur = Guid.Parse("e7820f92-eab1-42f5-ae96-5c16e71ff1e6"),
|
|
IdReferent = Guid.Parse("d4fc247b-015a-44d6-8f3e-a52f0902d2bf"),
|
|
IdBu = 1,
|
|
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),
|
|
DateDisponibilite = new DateTime(2020, 5, 25),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.SignatureReferent,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 6, 23)
|
|
};
|
|
|
|
epContext.Ep.Add(ep17);
|
|
|
|
ep18 = new Ep
|
|
{
|
|
IdEP = 18,
|
|
IdCollaborateur = Guid.Parse("1429be5b-9125-482c-80c4-c1d34afbd8d2"),
|
|
IdReferent = Guid.Parse("3f276ab8-727a-4e26-ad5d-4d296158688e"),
|
|
IdBu = 3,
|
|
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),
|
|
DateDisponibilite = new DateTime(2020, 6, 25),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.SignatureReferent,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 7, 23)
|
|
};
|
|
|
|
epContext.Ep.Add(ep18);
|
|
|
|
ep19 = new Ep
|
|
{
|
|
IdEP = 19,
|
|
IdCollaborateur = Guid.Parse("13fbe621-1bc9-4f04-afde-b54ca076e239"),
|
|
IdReferent = Guid.Parse("f1d14915-89f7-4c1a-a8e1-4148ed7d81d7"),
|
|
IdBu = 3,
|
|
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),
|
|
DateDisponibilite = new DateTime(2020, 7, 25),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.SignatureReferent,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 8, 23)
|
|
};
|
|
|
|
epContext.Ep.Add(ep19);
|
|
|
|
ep20 = new Ep
|
|
{
|
|
IdEP = 20,
|
|
IdCollaborateur = Guid.Parse("b5254c6c-7caa-435f-a4bb-e0cf92559832"),
|
|
IdReferent = Guid.Parse("dfea9a3c-7896-444d-9aa0-61ae536091c1"),
|
|
IdBu = 1,
|
|
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),
|
|
DateDisponibilite = new DateTime(2020, 9, 25),
|
|
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
|
|
{
|
|
IdDemandeFormation = 1,
|
|
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
|
|
{
|
|
IdDemandeFormation = 2,
|
|
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
|
|
{
|
|
IdDemandeFormation = 3,
|
|
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
|
|
{
|
|
IdDemandeFormation = 4,
|
|
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
|
|
{
|
|
IdDemandeFormation = 5,
|
|
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
|
|
{
|
|
IdDemandeFormation = 6,
|
|
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
|
|
{
|
|
IdDemandeFormation = 7,
|
|
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
|
|
{
|
|
IdDemandeFormation = 8,
|
|
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
|
|
{
|
|
IdDemandeFormation = 9,
|
|
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
|
|
{
|
|
IdDemandeFormation = 10,
|
|
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
|
|
{
|
|
IdDemandeFormation = 11,
|
|
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
|
|
{
|
|
IdDemandeFormation = 12,
|
|
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
|
|
{
|
|
IdParticipationFormation = 1,
|
|
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
|
|
{
|
|
IdParticipationFormation = 2,
|
|
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
|
|
{
|
|
IdParticipationFormation = 3,
|
|
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
|
|
{
|
|
IdParticipationFormation = 4,
|
|
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
|
|
{
|
|
IdParticipationFormation = 5,
|
|
DateCreation = new DateTime(2020, 5, 25, 9, 0, 0),
|
|
EstEvaluee = false,
|
|
DemandeFormation = d5,
|
|
Formation = f3
|
|
};
|
|
epContext.ParticipationFormation.Add(p5);
|
|
|
|
p6 = new ParticipationFormation
|
|
{
|
|
IdParticipationFormation = 6,
|
|
DateCreation = new DateTime(2020, 6, 25, 9, 0, 0),
|
|
EstEvaluee = false,
|
|
DemandeFormation = d6,
|
|
Formation = f4
|
|
};
|
|
epContext.ParticipationFormation.Add(p6);
|
|
|
|
p7 = new ParticipationFormation
|
|
{
|
|
IdParticipationFormation = 7,
|
|
DateCreation = new DateTime(2020, 7, 25, 9, 0, 0),
|
|
EstEvaluee = false,
|
|
DemandeFormation = d7,
|
|
Formation = f4
|
|
};
|
|
epContext.ParticipationFormation.Add(p7);
|
|
|
|
p8 = new ParticipationFormation
|
|
{
|
|
IdParticipationFormation = 8,
|
|
DateCreation = new DateTime(2020, 8, 25, 9, 0, 0),
|
|
EstEvaluee = false,
|
|
DemandeFormation = d8,
|
|
Formation = f5
|
|
};
|
|
epContext.ParticipationFormation.Add(p8);
|
|
/*
|
|
p9 = new ParticipationFormation
|
|
{
|
|
IdParticipationFormation = 9,
|
|
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
|
|
{
|
|
IdParticipationFormation = 10,
|
|
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
|
|
{
|
|
IdParticipationFormation = 11,
|
|
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
|
|
{
|
|
IdParticipationFormation = 12,
|
|
DateCreation = new DateTime(2020, 12, 25, 9, 0, 0),
|
|
EstEvaluee = false,
|
|
IdDemandeFormation = d12.IdDemandeFormation,
|
|
DemandeFormation = d12,
|
|
Formation = f9
|
|
};
|
|
epContext.ParticipationFormation.Add(p12);
|
|
|
|
*/
|
|
epContext.SaveChanges();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Insère un jeu de données fictif pour les champs
|
|
/// </summary>
|
|
/// <param name="epContext"></param>
|
|
public static void AddChamps(EpContext epContext)
|
|
{
|
|
|
|
Champ c;
|
|
|
|
//CHAMPS EPS
|
|
c = new Champ { IdChamp = 1 , Section = "Mission/Projet", Ordre = 0, Texte = "Impressions générales", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Commentaire };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 2, Section = "Mission/Projet", Ordre = 1, Texte = "Faits marquants", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Commentaire };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 3, Section = "Mission/Projet", Ordre = 2, Texte = "Succès", TypeChamp = TypeChamps.EPS };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 4, Section = "Mission/Projet", Ordre = 3, Texte = "Retours Client/Chef de projet", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Commentaire };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 5, Section = "Mission/Projet", Ordre = 4, Texte = "Difficultés", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 6, Section = "Mission/Projet", Ordre = 5, Texte = "Relation Client/Chef de projet", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 7, Section = "Mission/Projet", Ordre = 6, Texte = "Ambiance de travail", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 8, Section = "Mission/Projet", Ordre = 7, Texte = "Intérêt technique", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 9, Section = "Mission/Projet", Ordre = 8, Texte = "Site géographique", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
|
|
|
|
c = new Champ { IdChamp = 10, Section = "Compétences", SousSection = "Compétences Générales", Ordre = 0, Texte = "Motivation", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 11, Section = "Compétences", SousSection = "Compétences Générales", Ordre = 1, Texte = "Adaptabilité", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 12, Section = "Compétences", SousSection = "Compétences Générales", Ordre = 2, Texte = "Force de proposition", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 13, Section = "Compétences", SousSection = "Compétences Générales", Ordre = 3, Texte = "Leadership", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 14, Section = "Compétences", SousSection = "Compétences Générales", Ordre = 4, Texte = "Ecoute", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 15, Section = "Compétences", SousSection = "Compétences Générales", Ordre = 5, Texte = "Prise de recul", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 16, Section = "Compétences", SousSection = "Compétences Générales", Ordre = 6, Texte = "Sens du service", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 17, Section = "Compétences", SousSection = "Compétences Générales", Ordre = 7, Texte = "Communication", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 18, Section = "Compétences", SousSection = "Compétences Générales", Ordre = 8, Texte = "Rigueur", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 19, Section = "Compétences", SousSection = "Compétences Générales", Ordre = 9, Texte = "Organisation", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 20, Section = "Compétences", SousSection = "Compétences Techniques", Ordre = 0, Texte = "Nouvelle compétence", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
epContext.Champ.Add(c);
|
|
|
|
|
|
|
|
c = new Champ { IdChamp = 21, Section = "Apside", Ordre = 0, Texte = "Relation avec la structure", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 22, Section = "Apside", Ordre = 1, Texte = "Sentiment d'écoute", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 23, Section = "Apside", Ordre = 2, Texte = "Perception de la stratégie de développement", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 24, Section = "Apside", Ordre = 3, Texte = "Esprit d'entreprise", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 25, Section = "Apside", Ordre = 4, Texte = "Transparence de l'information", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 26, Section = "Apside", Ordre = 5, Texte = "Politique de formation", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 27, Section = "Apside", Ordre = 6, Texte = "Satisfaction Apside", TypeChamp = TypeChamps.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
|
|
|
|
//CHAMPS EPA
|
|
c = new Champ { IdChamp = 28, Section = "Formation", Ordre = 0, Texte = "Formations effectuées", TypeChamp = TypeChamps.EPA, TypeSaisie = TypeSaisie.Aucun };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 29, Section = "Evolution Professionnelle et Salarial", Ordre = 0, Texte = "Evolution de l'emploie", TypeChamp = TypeChamps.EPA, TypeSaisie = TypeSaisie.Aucun };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 30, Section = "Projet professionnel/Souhait d’évolution ", Ordre = 0, Texte = "A court terme", TypeChamp = TypeChamps.EPA, TypeSaisie = TypeSaisie.Commentaire };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 31, Section = "Projet professionnel/Souhait d’évolution ", Ordre = 1, Texte = "A long terme", TypeChamp = TypeChamps.EPA, TypeSaisie = TypeSaisie.Commentaire };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 32, Section = "Projet professionnel/Souhait d’évolution ", Ordre = 2, Texte = "Atouts/Freins pour ce projet", TypeChamp = TypeChamps.EPA, TypeSaisie = TypeSaisie.Commentaire };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 33, Section = "Projet professionnel/Souhait d’évolution ", Ordre = 3, Texte = "Commentaire référent", TypeChamp = TypeChamps.EPA, TypeSaisie = TypeSaisie.Commentaire };
|
|
epContext.Champ.Add(c);
|
|
|
|
//CHAMPS EPASIX
|
|
c = new Champ { IdChamp = 34, Section = "Evolution", Ordre = 1, Texte = "Evolution du salaire", TypeChamp = TypeChamps.EPASIXANS, TypeSaisie = TypeSaisie.Aucun };
|
|
epContext.Champ.Add(c);
|
|
/*c = new Champ { Section = "", SousSection = "", Ordre = 0, Texte = "", TypeChamp = TypeChamps.EPASIXANS };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "", SousSection = "", Ordre = 0, Texte = "", TypeChamp = TypeChamps.EPASIXANS };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "", SousSection = "", Ordre = 0, Texte = "", TypeChamp = TypeChamps.EPASIXANS };
|
|
this.Champ.Add(c);*/
|
|
|
|
//CHAMPS EVALUATION
|
|
c = new Champ { IdChamp = 35, Section = "Evaluation", Ordre = 0, Texte = "Accueil et organisation", TypeChamp = TypeChamps.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 36, Section = "Evaluation", Ordre = 1, Texte = "Compétences animateur", TypeChamp = TypeChamps.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 37, Section = "Evaluation", Ordre = 2, Texte = "Pédagogie/Animation", TypeChamp = TypeChamps.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 38, Section = "Evaluation", Ordre = 3, Texte = "Exhaustivité des sujets traités", TypeChamp = TypeChamps.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 39, Section = "Evaluation", Ordre = 4, Texte = "Utilité/Apport de la formation", TypeChamp = TypeChamps.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 40, Section = "Evaluation", Ordre = 5, Texte = "Contenu théorique", TypeChamp = TypeChamps.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 41, Section = "Evaluation", Ordre = 6, Texte = "Contenu pratique", TypeChamp = TypeChamps.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 42, Section = "Evaluation", Ordre = 7, Texte = "Equilibre pratique/théorie", TypeChamp = TypeChamps.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 43, Section = "Evaluation", Ordre = 8, Texte = "Support de cours", TypeChamp = TypeChamps.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
c = new Champ { IdChamp = 44, Section = "Evaluation", Ordre = 9, Texte = "Durée", TypeChamp = TypeChamps.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
epContext.Champ.Add(c);
|
|
|
|
|
|
epContext.SaveChanges();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Insère un jeu de données fictif pour les notes
|
|
/// </summary>
|
|
/// <param name="epContext"></param>
|
|
public static void AddNotes(EpContext epContext)
|
|
{
|
|
Note note;
|
|
|
|
note = new Note()
|
|
{
|
|
IdNote = 1,
|
|
Titre = "Titre1",
|
|
Texte = "Texte1",
|
|
IdAuteur = new Guid("aa36f34c-9041-42f5-9db3-6536fe7f1696"),
|
|
IdCollaborateur = new Guid("842650db-a548-4472-a3af-4c5fff3c1ab8"),
|
|
DateCreation = DateTime.Now,
|
|
DateMiseAJour = DateTime.Now
|
|
|
|
};
|
|
epContext.Note.Add(note);
|
|
|
|
note = new Note()
|
|
{
|
|
IdNote = 2,
|
|
Titre = "Titre2",
|
|
Texte = "Texte2",
|
|
IdAuteur = new Guid("aa36f34c-9041-42f5-9db3-6536fe7f1696"),
|
|
IdCollaborateur = new Guid("842650db-a548-4472-a3af-4c5fff3c1ab8"),
|
|
DateCreation = DateTime.Now,
|
|
DateMiseAJour = DateTime.Now
|
|
|
|
};
|
|
epContext.Note.Add(note);
|
|
|
|
note = new Note()
|
|
{
|
|
IdNote = 3,
|
|
Titre = "Titre3",
|
|
Texte = "Texte3",
|
|
IdAuteur = new Guid(),
|
|
IdCollaborateur = new Guid("842650db-a548-4472-a3af-4c5fff3c1ab8"),
|
|
DateCreation = DateTime.Now,
|
|
DateMiseAJour = DateTime.Now
|
|
|
|
};
|
|
epContext.Note.Add(note);
|
|
|
|
note = new Note()
|
|
{
|
|
IdNote = 4,
|
|
Titre = "Titre4",
|
|
Texte = "Texte4",
|
|
IdAuteur = new Guid("aa36f34c-9041-42f5-9db3-6536fe7f1696"),
|
|
IdCollaborateur = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"),
|
|
DateCreation = DateTime.Now,
|
|
DateMiseAJour = DateTime.Now
|
|
|
|
};
|
|
epContext.Note.Add(note);
|
|
|
|
note = new Note()
|
|
{
|
|
IdNote = 5,
|
|
Titre = "Titre5",
|
|
Texte = "Texte5",
|
|
IdAuteur = new Guid("aa36f34c-9041-42f5-9db3-6536fe7f1696"),
|
|
IdCollaborateur = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"),
|
|
DateCreation = DateTime.Now,
|
|
DateMiseAJour = DateTime.Now
|
|
|
|
};
|
|
epContext.Note.Add(note);
|
|
|
|
note = new Note()
|
|
{
|
|
IdNote = 6,
|
|
Titre = "Titre6",
|
|
Texte = "Texte6",
|
|
IdAuteur = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
IdCollaborateur = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"),
|
|
DateCreation = DateTime.Now,
|
|
DateMiseAJour = DateTime.Now
|
|
|
|
};
|
|
epContext.Note.Add(note);
|
|
|
|
note = new Note()
|
|
{
|
|
IdNote = 7,
|
|
Titre = "Titre7",
|
|
Texte = "Texte7",
|
|
IdAuteur = new Guid(),
|
|
IdCollaborateur = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"),
|
|
DateCreation = DateTime.Now,
|
|
DateMiseAJour = DateTime.Now
|
|
|
|
};
|
|
epContext.Note.Add(note);
|
|
|
|
note = new Note()
|
|
{
|
|
IdNote = 8,
|
|
Titre = "Titre8",
|
|
Texte = "Texte8",
|
|
IdAuteur = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
IdCollaborateur = new Guid(),
|
|
DateCreation = DateTime.Now,
|
|
DateMiseAJour = DateTime.Now
|
|
|
|
};
|
|
epContext.Note.Add(note);
|
|
|
|
note = new Note()
|
|
{
|
|
IdNote = 9,
|
|
Titre = "Titre9",
|
|
Texte = "Texte9",
|
|
IdAuteur = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
IdCollaborateur = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"),
|
|
DateCreation = DateTime.Now,
|
|
DateMiseAJour = DateTime.Now
|
|
|
|
};
|
|
epContext.Note.Add(note);
|
|
|
|
note = new Note()
|
|
{
|
|
IdNote = 10,
|
|
Titre = "Titre10",
|
|
Texte = "Texte10",
|
|
IdAuteur = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
IdCollaborateur = new Guid(),
|
|
DateCreation = DateTime.Now,
|
|
DateMiseAJour = DateTime.Now
|
|
|
|
};
|
|
epContext.Note.Add(note);
|
|
|
|
epContext.SaveChanges();
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Insérer un jeu de données fictif pour les référents EP
|
|
/// </summary>
|
|
/// <param name="epContext"></param>
|
|
public static void AddRereferentEP(EpContext epContext)
|
|
{
|
|
ReferentEP referentEP;
|
|
|
|
referentEP = new ReferentEP()
|
|
{
|
|
IdCollaborateur = new Guid("842650db-a548-4472-a3af-4c5fff3c1ab8"),
|
|
IdReferent = new Guid("aa36f34c-9041-42f5-9db3-6536fe7f1696")
|
|
};
|
|
|
|
epContext.ReferentEP.Add(referentEP);
|
|
|
|
referentEP = new ReferentEP()
|
|
{
|
|
IdCollaborateur = new Guid("de98a866-736f-4295-a669-92a8694e2ee3"),
|
|
IdReferent = new Guid("aa36f34c-9041-42f5-9db3-6536fe7f1696")
|
|
};
|
|
|
|
epContext.ReferentEP.Add(referentEP);
|
|
|
|
referentEP = new ReferentEP()
|
|
{
|
|
IdCollaborateur = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"),
|
|
IdReferent = new Guid("aa36f34c-9041-42f5-9db3-6536fe7f1696")
|
|
};
|
|
|
|
epContext.ReferentEP.Add(referentEP);
|
|
|
|
referentEP = new ReferentEP()
|
|
{
|
|
IdCollaborateur = new Guid("4f3fcd23-a1e4-4c9e-afa2-d06ca9216491"),
|
|
IdReferent = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d")
|
|
};
|
|
|
|
epContext.ReferentEP.Add(referentEP);
|
|
|
|
referentEP = new ReferentEP()
|
|
{
|
|
IdCollaborateur = new Guid("0968ccd3-1ef5-4041-83f3-1c76afb02bbf"),
|
|
IdReferent = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d")
|
|
};
|
|
|
|
epContext.ReferentEP.Add(referentEP);
|
|
|
|
referentEP = new ReferentEP()
|
|
{
|
|
IdCollaborateur = new Guid("1429be5b-9125-482c-80c4-c1d34afbd8d2"),
|
|
IdReferent = new Guid("e7820f92-eab1-42f5-ae96-5c16e71ff1e6")
|
|
};
|
|
|
|
epContext.ReferentEP.Add(referentEP);
|
|
|
|
referentEP = new ReferentEP()
|
|
{
|
|
IdCollaborateur = new Guid("13fbe621-1bc9-4f04-afde-b54ca076e239"),
|
|
IdReferent = new Guid("e7820f92-eab1-42f5-ae96-5c16e71ff1e6")
|
|
};
|
|
|
|
epContext.ReferentEP.Add(referentEP);
|
|
|
|
referentEP = new ReferentEP()
|
|
{
|
|
IdCollaborateur = new Guid("b5254c6c-7caa-435f-a4bb-e0cf92559832"),
|
|
IdReferent = new Guid("de98a866-736f-4295-a669-92a8694e2ee3")
|
|
};
|
|
|
|
epContext.ReferentEP.Add(referentEP);
|
|
|
|
referentEP = new ReferentEP()
|
|
{
|
|
IdCollaborateur = new Guid("e7820f92-eab1-42f5-ae96-5c16e71ff1e6"),
|
|
IdReferent = new Guid("de98a866-736f-4295-a669-92a8694e2ee3")
|
|
};
|
|
|
|
epContext.ReferentEP.Add(referentEP);
|
|
|
|
epContext.SaveChanges();
|
|
|
|
}
|
|
/// <summary>
|
|
/// Insérer un jeu de données fictif pour les demandes de délégation
|
|
/// </summary>
|
|
/// <param name="epContext"></param>
|
|
public static void AddDemandeDelegationEP(EpContext context)
|
|
{
|
|
Ep ep21, ep22, ep23, ep24, ep25, ep26, ep27;
|
|
DemandeDelegation dm1, dm2, dm3, dm4, dm5, dm6, dm7;
|
|
|
|
ep21 = new Ep
|
|
{
|
|
IdEP = 21,
|
|
IdCollaborateur = Guid.Parse("842650db-a548-4472-a3af-4c5fff3c1ab8"),
|
|
IdReferent = Guid.Parse("aa36f34c-9041-42f5-9db3-6536fe7f1696"),
|
|
IdBu = 2,
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2020, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2020, 7, 8),
|
|
DateDisponibilite = new DateTime(2020, 6, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.DatesProposees,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 7, 20)
|
|
};
|
|
|
|
|
|
dm1 = new DemandeDelegation()
|
|
{
|
|
IdDemandeDelegation = 1,
|
|
DateDemande = DateTime.Now,
|
|
Ep = ep21,
|
|
IdReferent = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
EtatDemande = EtatDemande.EnAttente,
|
|
RaisonDemande = "Raison quelconque 1"
|
|
};
|
|
|
|
context.DemandeDelegation.Add(dm1);
|
|
|
|
ep22 = new Ep
|
|
{
|
|
IdEP = 22,
|
|
IdCollaborateur = Guid.Parse("e7820f92-eab1-42f5-ae96-5c16e71ff1e6"),
|
|
IdReferent = Guid.Parse("aa36f34c-9041-42f5-9db3-6536fe7f1696"),
|
|
IdBu = 1,
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2020, 7, 7),
|
|
DateDisponibilite = new DateTime(2020, 6, 8),
|
|
DatePrevisionnelle = new DateTime(2020, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.DatesProposees,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 7, 20)
|
|
};
|
|
|
|
|
|
dm2 = new DemandeDelegation()
|
|
{
|
|
IdDemandeDelegation = 2,
|
|
DateDemande = DateTime.Now,
|
|
Ep = ep22,
|
|
IdReferent = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
EtatDemande = EtatDemande.EnAttente,
|
|
RaisonDemande = "Raison quelconque 2"
|
|
};
|
|
|
|
context.DemandeDelegation.Add(dm2);
|
|
|
|
ep23 = new Ep
|
|
{
|
|
IdEP = 23,
|
|
IdCollaborateur = Guid.Parse("b5254c6c-7caa-435f-a4bb-e0cf92559832"),
|
|
IdReferent = Guid.Parse("aa36f34c-9041-42f5-9db3-6536fe7f1696"),
|
|
IdBu = 1,
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2020, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2020, 7, 8),
|
|
DateDisponibilite = new DateTime(2020, 6, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.DatesProposees,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 7, 20)
|
|
};
|
|
|
|
|
|
dm3 = new DemandeDelegation()
|
|
{
|
|
IdDemandeDelegation = 3,
|
|
DateDemande = DateTime.Now,
|
|
Ep = ep23,
|
|
IdReferent = new Guid("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d"),
|
|
EtatDemande = EtatDemande.EnAttente,
|
|
RaisonDemande = "Raison quelconque 3"
|
|
};
|
|
|
|
context.DemandeDelegation.Add(dm3);
|
|
|
|
ep24 = new Ep
|
|
{
|
|
IdEP = 24,
|
|
IdCollaborateur = Guid.Parse("13fbe621-1bc9-4f04-afde-b54ca076e239"),
|
|
IdReferent = Guid.Parse("771f9129-5610-4f4b-a8eb-902a98d722be"),
|
|
IdBu = 3,
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2020, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2020, 7, 8),
|
|
DateDisponibilite = new DateTime(2020, 6, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.DatesProposees,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 7, 20)
|
|
};
|
|
|
|
|
|
dm4 = new DemandeDelegation()
|
|
{
|
|
IdDemandeDelegation = 4,
|
|
DateDemande = DateTime.Now,
|
|
Ep = ep24,
|
|
IdReferent = new Guid("0afd1573-de75-4e5b-bfcb-1985259d8370"),
|
|
EtatDemande = EtatDemande.EnAttente,
|
|
RaisonDemande = "Raison quelconque 4"
|
|
};
|
|
|
|
context.DemandeDelegation.Add(dm4);
|
|
|
|
ep25 = new Ep
|
|
{
|
|
IdEP = 25,
|
|
IdCollaborateur = Guid.Parse("e7820f92-eab1-42f5-ae96-5c16e71ff1e6"),
|
|
IdReferent = Guid.Parse("d4fc247b-015a-44d6-8f3e-a52f0902d2bf"),
|
|
IdBu = 1,
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2020, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2020, 7, 8),
|
|
DateDisponibilite = new DateTime(2020, 6, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.DatesProposees,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 7, 20)
|
|
};
|
|
|
|
|
|
dm5 = new DemandeDelegation()
|
|
{
|
|
IdDemandeDelegation = 5,
|
|
DateDemande = DateTime.Now,
|
|
Ep = ep25,
|
|
IdReferent = new Guid("de98a866-736f-4295-a669-92a8694e2ee3"),
|
|
EtatDemande = EtatDemande.EnAttente,
|
|
RaisonDemande = "Raison quelconque 5"
|
|
};
|
|
|
|
context.DemandeDelegation.Add(dm5);
|
|
|
|
ep26 = new Ep
|
|
{
|
|
IdEP = 26,
|
|
IdCollaborateur = Guid.Parse("301ba7f3-095e-4912-8998-a7c942dc5f23"),
|
|
IdReferent = Guid.Parse("d4fc247b-015a-44d6-8f3e-a52f0902d2bf"),
|
|
IdBu = 1,
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2020, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2020, 7, 8),
|
|
DateDisponibilite = new DateTime(2020, 6, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 7, 20)
|
|
};
|
|
|
|
|
|
dm6 = new DemandeDelegation()
|
|
{
|
|
IdDemandeDelegation = 6,
|
|
DateDemande = DateTime.Now,
|
|
Ep = ep26,
|
|
IdReferent = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"),
|
|
EtatDemande = EtatDemande.EnAttente,
|
|
RaisonDemande = "Raison quelconque 6"
|
|
};
|
|
|
|
context.DemandeDelegation.Add(dm6);
|
|
|
|
|
|
ep27 = new Ep
|
|
{
|
|
IdEP = 27,
|
|
IdCollaborateur = Guid.Parse("301ba7f3-095e-4912-8998-a7c942dc5f23"),
|
|
IdReferent = Guid.Parse("d4fc247b-015a-44d6-8f3e-a52f0902d2bf"),
|
|
IdBu = 1,
|
|
Fonction = "Ingénieur en Etudes et Développement",
|
|
TypeEP = TypeEp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2020, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2020, 7, 8),
|
|
DateDisponibilite = new DateTime(2020, 6, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEp.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2020, 7, 20)
|
|
};
|
|
|
|
|
|
dm7 = new DemandeDelegation()
|
|
{
|
|
IdDemandeDelegation = 7,
|
|
DateDemande = DateTime.Now,
|
|
Ep = ep27,
|
|
IdReferent = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"),
|
|
EtatDemande = EtatDemande.Rejetee,
|
|
RaisonDemande = "Raison quelconque 7"
|
|
};
|
|
|
|
context.DemandeDelegation.Add(dm7);
|
|
|
|
context.SaveChanges();
|
|
}
|
|
|
|
}
|
|
}
|
|
|