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.
951 lines
41 KiB
951 lines
41 KiB
using EPAServeur.Models.EP;
|
|
using EPAServeur.Models.Formation;
|
|
using EPAServeur.Models.Notes;
|
|
using EPAServeur.Models.SaisieChamp;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace EPAServeur.Context
|
|
{
|
|
public class EpContext : DbContext
|
|
{
|
|
//EP
|
|
public DbSet<AugmentationSalaire> AugmentationSalaire { get; set; }
|
|
public DbSet<Autorisation> Autorisation { get; set; }
|
|
public DbSet<ChoixTypeEntretien> ChoixTypeEntretien { get; set; }
|
|
public DbSet<Document> Document { get; set; }
|
|
public DbSet<Engagement> Engagement { get; set; }
|
|
public DbSet<Ep> Ep { get; set; }
|
|
public DbSet<Objectif> Objectif { get; set; }
|
|
public DbSet<ObjectifPrecedent> ObjectifPrecedent { get; set; }
|
|
public DbSet<RdvEntretien> RdvEntretien { get; set; }
|
|
public DbSet<TypeEntretien> TypeEntretien { get; set; }
|
|
|
|
//Formation
|
|
public DbSet<DemandeFormation> DemandeFormation { get; set; }
|
|
public DbSet<Formation> Formation { get; set; }
|
|
public DbSet<ModeFormation> ModeFormation { get; set; }
|
|
public DbSet<OrigineDemandeFormation> OrigineDemandeFormation { get; set; }
|
|
public DbSet<OrigineFormation> OrigineFormation { get; set; }
|
|
public DbSet<ParticipationFormation> ParticipationFormation { get; set; }
|
|
public DbSet<StatutFormation> StatutFormation { get; set; }
|
|
public DbSet<Theme> Theme { get; set; }
|
|
public DbSet<TypeFormation> TypeFormation { get; set; }
|
|
|
|
//Note
|
|
public DbSet<Note> Note { get; set; }
|
|
|
|
//SaisieChamp
|
|
public DbSet<Champ> Champ { get; set; }
|
|
public DbSet<Saisie> Saisie { get; set; }
|
|
|
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
optionsBuilder.UseMySQL("server=localhost;database=server_ep;user=root;password=root");//PENSER A METTRE DANS UN FICHIER DE CONFIG
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
base.OnModelCreating(modelBuilder);
|
|
//EP
|
|
modelBuilder.Entity<AugmentationSalaire>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
modelBuilder.Entity<Autorisation>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
modelBuilder.Entity<Document>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
modelBuilder.Entity<Engagement>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
modelBuilder.Entity<Ep>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.HasOne<AugmentationSalaire>(e => e.AugmentationSalaire).WithOne(a => a.Ep).HasForeignKey<AugmentationSalaire>(a => a.EpId);
|
|
entity.HasOne<Autorisation>(e => e.Autorisation).WithOne( a => a.Ep).HasForeignKey<Autorisation>(a => a.EpId);
|
|
entity.HasMany<ChoixTypeEntretien>(e => e.ChoixTypeEntretien).WithOne(c => c.Ep);
|
|
entity.HasOne<Delegation>(e => e.Delegation).WithOne(d => d.Ep).HasForeignKey<Delegation>(d => d.EpId);
|
|
entity.HasMany<DemandeFormation>(e => e.DemandesFormation).WithOne(d => d.Ep);
|
|
entity.HasMany<Document>(e => e.Documents).WithOne(d => d.Ep);
|
|
entity.HasMany<Engagement>(e => e.Engagements).WithOne(e => e.Ep);
|
|
entity.HasMany<Objectif>(e => e.Objectifs).WithOne(o => o.Ep);
|
|
entity.HasMany<ObjectifPrecedent>(e => e.ObjectifsPrecedents).WithOne(o => o.Ep);
|
|
entity.HasMany<ParticipantEP>(e => e.Participants).WithOne(p => p.Ep);
|
|
entity.HasOne<RdvEntretien>(e => e.RdvEntretien).WithOne(r => r.EpChoixFinal).HasForeignKey<RdvEntretien>(r => r.EpId);
|
|
entity.HasMany<RdvEntretien>(e => e.PropositionsRDV).WithOne(r => r.EpProposition);
|
|
});
|
|
|
|
modelBuilder.Entity<Objectif>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
modelBuilder.Entity<ObjectifPrecedent>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
modelBuilder.Entity<RdvEntretien>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
modelBuilder.Entity<TypeEntretien>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.HasIndex(e => e.Libelle).IsUnique();
|
|
});
|
|
|
|
//Formation
|
|
modelBuilder.Entity<DemandeFormation>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
modelBuilder.Entity<Formation>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
modelBuilder.Entity<ModeFormation>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
entity.HasIndex(e => e.Libelle).IsUnique();
|
|
});
|
|
|
|
modelBuilder.Entity<OrigineDemandeFormation>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
entity.HasIndex(e => e.Libelle).IsUnique();
|
|
});
|
|
|
|
modelBuilder.Entity<OrigineFormation>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
entity.HasIndex(e => e.Libelle).IsUnique();
|
|
});
|
|
|
|
modelBuilder.Entity<ParticipationFormation>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
modelBuilder.Entity<StatutFormation>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
entity.HasIndex(e => e.Libelle).IsUnique();
|
|
});
|
|
|
|
modelBuilder.Entity<Theme>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
entity.HasIndex(e => e.Libelle).IsUnique();
|
|
});
|
|
|
|
modelBuilder.Entity<TypeFormation>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
entity.HasIndex(e => e.Libelle).IsUnique();
|
|
});
|
|
|
|
//Notes
|
|
modelBuilder.Entity<Note>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
//SaisieChamp
|
|
modelBuilder.Entity<Champ>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
|
|
modelBuilder.Entity<Saisie>(entity =>
|
|
{
|
|
entity.HasKey(e => e.Id);
|
|
entity.Property(e => e.Id).ValueGeneratedOnAdd();
|
|
});
|
|
}
|
|
|
|
|
|
public void AjoutTheme() //Les thèmes pourront être ajoutés et conservés
|
|
{
|
|
Theme management, securite, developpement, gestionprojet;
|
|
management = new Theme { Libelle = "Management" };
|
|
this.Theme.Add(management);
|
|
securite = new Theme { Libelle = "Sécurité" };
|
|
this.Theme.Add(securite);
|
|
developpement = new Theme { Libelle = "Développement" };
|
|
this.Theme.Add(developpement);
|
|
gestionprojet = new Theme { Libelle = "Gestion de projet" };
|
|
this.Theme.Add(gestionprojet);
|
|
this.SaveChanges();
|
|
}
|
|
|
|
/*Les informations ajoutées pourront être conservées
|
|
* */
|
|
public void AjoutInformationsDeBase()
|
|
{
|
|
//StatutFormation
|
|
StatutFormation statutPlanifie, statutReplanifie, statutRealise, statutAnnule;
|
|
statutPlanifie = new StatutFormation { Id = 1, Libelle = "Planifiée" };
|
|
this.StatutFormation.Add(statutPlanifie);
|
|
statutReplanifie = new StatutFormation { Id = 2, Libelle = "Replanifié" };
|
|
this.StatutFormation.Add(statutReplanifie);
|
|
statutRealise = new StatutFormation { Id = 3, Libelle = "Réalisée" };
|
|
this.StatutFormation.Add(statutRealise);
|
|
statutAnnule = new StatutFormation { Id = 4, Libelle = "Annulée" };
|
|
this.StatutFormation.Add(statutAnnule);
|
|
|
|
//ModeFormation
|
|
ModeFormation modeExterne, modeInterne, modePresentiel, modeELearning;
|
|
modeExterne = new ModeFormation { Libelle = "Externe" };
|
|
this.ModeFormation.Add(modeExterne);
|
|
modeInterne = new ModeFormation { Libelle = "Interne" };
|
|
this.ModeFormation.Add(modeInterne);
|
|
modePresentiel = new ModeFormation { Libelle = "Présentiel" };
|
|
this.ModeFormation.Add(modePresentiel);
|
|
modeELearning = new ModeFormation { Libelle = "E-learning" };
|
|
this.ModeFormation.Add(modeELearning);
|
|
|
|
//TypeFormation
|
|
TypeFormation typeExterne, typeInterne, typeELearning, typeAcademy;
|
|
typeExterne = new TypeFormation { Libelle = "Externe" };
|
|
this.TypeFormation.Add(typeExterne);
|
|
typeInterne = new TypeFormation { Libelle = "Interne" };
|
|
this.TypeFormation.Add(typeInterne);
|
|
typeELearning = new TypeFormation { Libelle = "E-learning" };
|
|
this.TypeFormation.Add(typeELearning);
|
|
typeAcademy = new TypeFormation { Libelle = "Academy by Apside" };
|
|
this.TypeFormation.Add(typeAcademy);
|
|
|
|
//OrigineFormation
|
|
OrigineFormation origineFormationCollaborateur, origineFormationClient, origineFormationApside, origineFormationReglementaire;
|
|
origineFormationCollaborateur = new OrigineFormation { Libelle = "Demande collaborateur" };
|
|
this.OrigineFormation.Add(origineFormationCollaborateur);
|
|
origineFormationClient = new OrigineFormation { Libelle = "Exigence client" };
|
|
this.OrigineFormation.Add(origineFormationClient);
|
|
origineFormationApside = new OrigineFormation { Libelle = "Exigence Apside" };
|
|
this.OrigineFormation.Add(origineFormationApside);
|
|
origineFormationReglementaire = new OrigineFormation { Libelle = "Formation réglementaire" };
|
|
this.OrigineFormation.Add(origineFormationReglementaire);
|
|
|
|
//OrigineDemandeFormation
|
|
OrigineDemandeFormation origineDemandeFormationCollaborateur, origineDemandeFormationEP,
|
|
origineDemandeFormationClient, origineDemandeFormationReglement, origineDemandeFormationApside;
|
|
origineDemandeFormationCollaborateur = new OrigineDemandeFormation { Libelle = "Demande collaborateur" };
|
|
this.OrigineDemandeFormation.Add(origineDemandeFormationCollaborateur);
|
|
origineDemandeFormationEP = new OrigineDemandeFormation { Libelle = "Demande EP" };
|
|
this.OrigineDemandeFormation.Add(origineDemandeFormationEP);
|
|
origineDemandeFormationClient = new OrigineDemandeFormation { Libelle = "Exigence Client" };
|
|
this.OrigineDemandeFormation.Add(origineDemandeFormationClient);
|
|
origineDemandeFormationReglement = new OrigineDemandeFormation { Libelle = "Formation réglementaire" };
|
|
this.OrigineDemandeFormation.Add(origineDemandeFormationReglement);
|
|
origineDemandeFormationApside = new OrigineDemandeFormation { Libelle = "Demande Apside" };
|
|
this.OrigineDemandeFormation.Add(origineDemandeFormationApside);
|
|
|
|
//TypeEntretien
|
|
TypeEntretien typeSite, typeClient, typeVisio, typeTelephone;
|
|
typeSite = new TypeEntretien { Libelle = "Sur site" };
|
|
this.TypeEntretien.Add(typeSite);
|
|
typeClient = new TypeEntretien { Libelle = "Chez le client" };
|
|
this.TypeEntretien.Add(typeClient);
|
|
typeVisio = new TypeEntretien { Libelle = "Visioconférence" };
|
|
this.TypeEntretien.Add(typeVisio);
|
|
typeTelephone = new TypeEntretien { Libelle = "Téléphonique" };
|
|
this.TypeEntretien.Add(typeTelephone);
|
|
|
|
//Formation
|
|
Formation f1, f2, f3;//Planifiées
|
|
Formation f4, f5; // Réalisées
|
|
Formation f6, f7, f8, f9;//Replanifiées
|
|
Formation f10, f11; //Annulées
|
|
//new DateTime(Année, Mois, Jour, Heure, Minute...)
|
|
|
|
|
|
List<Formation> formations = new List<Formation>();
|
|
|
|
f1 = new Formation
|
|
{
|
|
Intitule = "Formation1",
|
|
IdAgence = 1,
|
|
DateDebut = new DateTime(2020, 9, 16, 10, 0, 0),
|
|
DateFin = new DateTime(2020, 9, 16),
|
|
Heure = 2,
|
|
Jour = 1,
|
|
ModeFormation = modeELearning,
|
|
TypeFormation = typeELearning,
|
|
Organisme = "Organisme1",
|
|
Origine = origineFormationClient,
|
|
Statut = statutPlanifie,
|
|
EstCertifiee = false
|
|
};
|
|
this.Formation.Add(f1);
|
|
|
|
f2 = new Formation
|
|
{
|
|
Intitule = "Formation2",
|
|
IdAgence =1,
|
|
DateDebut = new DateTime(2020, 10, 5, 14, 0, 0),
|
|
DateFin = new DateTime(2020, 10, 9),
|
|
Heure = 10,
|
|
Jour = 5,
|
|
ModeFormation = modeExterne,
|
|
TypeFormation = typeExterne,
|
|
Organisme = "Organisme2",
|
|
Origine = origineFormationClient,
|
|
Statut = statutPlanifie,
|
|
EstCertifiee = false
|
|
};
|
|
this.Formation.Add(f2);
|
|
|
|
f3 = new Formation
|
|
{
|
|
Intitule = "Formation3",
|
|
IdAgence = 1,
|
|
DateDebut = new DateTime(2020, 9, 21, 14, 0, 0),
|
|
DateFin = new DateTime(2020, 9, 21),
|
|
Heure = 4,
|
|
Jour = 2,
|
|
ModeFormation = modeELearning,
|
|
TypeFormation = typeELearning,
|
|
Organisme = "Organisme2",
|
|
Origine = origineFormationApside,
|
|
Statut = statutPlanifie,
|
|
EstCertifiee = true
|
|
};
|
|
this.Formation.Add(f3);
|
|
|
|
f4 = new Formation
|
|
{
|
|
Intitule = "Formation4",
|
|
IdAgence = 1,
|
|
DateDebut = new DateTime(2020, 05, 11, 14, 0, 0),
|
|
DateFin = new DateTime(2020, 05, 11),
|
|
Heure = 3,
|
|
Jour = 1,
|
|
ModeFormation = modeELearning,
|
|
TypeFormation = typeAcademy,
|
|
Organisme = "Organisme2",
|
|
Origine = origineFormationCollaborateur,
|
|
Statut = statutRealise,
|
|
EstCertifiee = true
|
|
};
|
|
this.Formation.Add(f4);
|
|
|
|
f5 = new Formation
|
|
{
|
|
Intitule = "Formation5",
|
|
IdAgence = 1,
|
|
DateDebut = new DateTime(2020, 08, 1, 13, 0, 0),
|
|
DateFin = new DateTime(2020, 08, 3),
|
|
Heure = 6,
|
|
Jour = 2,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeExterne,
|
|
Organisme = "Organisme3",
|
|
Origine = origineFormationClient,
|
|
Statut = statutRealise,
|
|
EstCertifiee = true
|
|
};
|
|
this.Formation.Add(f5);
|
|
|
|
f6 = new Formation
|
|
{
|
|
Intitule = "Formation6",
|
|
IdAgence = 1,
|
|
DateDebut = new DateTime(2020, 9, 30, 9, 0, 0),
|
|
DateFin = new DateTime(2020, 10, 1),
|
|
Heure = 4,
|
|
Jour = 2,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeInterne,
|
|
Organisme = "Organisme4",
|
|
Origine = origineFormationClient,
|
|
Statut = statutReplanifie,
|
|
EstCertifiee = false
|
|
};
|
|
this.Formation.Add(f6);
|
|
|
|
f7 = new Formation
|
|
{
|
|
Intitule = "Formation7",
|
|
IdAgence = 1,
|
|
DateDebut = new DateTime(2020, 10, 5, 10, 0, 0),
|
|
DateFin = new DateTime(2020, 10, 8),
|
|
Heure = 6,
|
|
Jour = 5,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeInterne,
|
|
Organisme = "Organisme2",
|
|
Origine = origineFormationClient,
|
|
Statut = statutReplanifie,
|
|
EstCertifiee = false
|
|
};
|
|
this.Formation.Add(f7);
|
|
|
|
f8 = new Formation
|
|
{
|
|
Intitule = "Formation2",
|
|
IdAgence = 1,
|
|
DateDebut = new DateTime(2020, 11, 18, 10, 0, 0),
|
|
DateFin = new DateTime(2020, 11, 20),
|
|
Heure = 6,
|
|
Jour = 3,
|
|
ModeFormation = modeELearning,
|
|
TypeFormation = typeAcademy,
|
|
Organisme = "Organisme4",
|
|
Origine = origineFormationClient,
|
|
Statut = statutReplanifie,
|
|
EstCertifiee = true
|
|
};
|
|
this.Formation.Add(f8);
|
|
|
|
f9 = new Formation
|
|
{
|
|
Intitule = "Formation9",
|
|
IdAgence = 1,
|
|
DateDebut = new DateTime(2020, 11, 15, 9, 0, 0),
|
|
DateFin = new DateTime(2020, 11, 15),
|
|
Heure = 3,
|
|
Jour = 1,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeInterne,
|
|
Organisme = "Organisme3",
|
|
Origine = origineFormationClient,
|
|
Statut = statutReplanifie,
|
|
EstCertifiee = true
|
|
};
|
|
this.Formation.Add(f9);
|
|
|
|
f10 = new Formation
|
|
{
|
|
Intitule = "Formation10",
|
|
IdAgence = 1,
|
|
DateDebut = new DateTime(2020, 8, 3, 14, 0, 0),
|
|
DateFin = new DateTime(2020, 8, 3),
|
|
Heure = 2,
|
|
Jour = 1,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeInterne,
|
|
Organisme = "Organisme4",
|
|
Origine = origineFormationClient,
|
|
Statut = statutAnnule,
|
|
EstCertifiee = false
|
|
};
|
|
this.Formation.Add(f10);
|
|
|
|
f11 = new Formation
|
|
{
|
|
Intitule = "Formation11",
|
|
IdAgence = 1,
|
|
DateDebut = new DateTime(2020, 04, 6, 9, 0, 0),
|
|
DateFin = new DateTime(2020, 04, 11),
|
|
Heure = 15,
|
|
Jour = 5,
|
|
ModeFormation = modePresentiel,
|
|
TypeFormation = typeInterne,
|
|
Organisme = "Organisme1",
|
|
Origine = origineFormationClient,
|
|
Statut = statutAnnule,
|
|
EstCertifiee = false
|
|
};
|
|
this.Formation.Add(f11);
|
|
/*
|
|
formations.Add(f1);
|
|
formations.Add(f2);
|
|
formations.Add(f3);
|
|
formations.Add(f4);
|
|
formations.Add(f5);
|
|
formations.Add(f6);
|
|
formations.Add(f7);
|
|
formations.Add(f8);
|
|
formations.Add(f9);
|
|
formations.Add(f10);
|
|
formations.Add(f11);
|
|
|
|
int[] npParticipants = { };
|
|
*/
|
|
//Créer des EP qui ont déjà été effectué (pas grave si il y a des informations qui sont incohérentes)
|
|
//C1 ---> C5 Collaborateurs
|
|
//C5 --> C10 CP+Tech Lead
|
|
//RH --> RH
|
|
//AS --> Assistant
|
|
//COM --> Commercial
|
|
//DEL --> Delivery
|
|
// 10 EP
|
|
/*
|
|
Ep ep;
|
|
DemandeFormation df;
|
|
ParticipationFormation pf;
|
|
ep = new Ep
|
|
{
|
|
IdCollaborateur = "C1",
|
|
IdReferent = "COM1",
|
|
IdAgence = 1,
|
|
IdBu = 2,
|
|
Fonction = "Dev",
|
|
TypeEP = TypeChamp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2017, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2018, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEP.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2018, 6, 20)
|
|
};
|
|
df = new DemandeFormation
|
|
{
|
|
Description = "Description formation",
|
|
DemandeRH = false,
|
|
DateDemande = new DateTime(2018, 7, 8),
|
|
};
|
|
|
|
|
|
Ep.Add(ep);
|
|
|
|
ep = new Ep
|
|
{
|
|
IdCollaborateur = "C1",
|
|
IdReferent = "C6",
|
|
IdAgence = 1,
|
|
IdBu = 2,
|
|
Fonction = "Dev",
|
|
TypeEP = TypeChamp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2017, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2018, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEP.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2018, 6, 20)
|
|
};
|
|
Ep.Add(ep);
|
|
|
|
ep = new Ep
|
|
{
|
|
IdCollaborateur = "C1",
|
|
IdReferent = "C6",
|
|
IdAgence = 1,
|
|
IdBu = 2,
|
|
Fonction = "Dev",
|
|
TypeEP = TypeChamp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2017, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2018, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEP.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2018, 6, 20)
|
|
};
|
|
Ep.Add(ep);
|
|
|
|
ep = new Ep
|
|
{
|
|
IdCollaborateur = "C1",
|
|
IdReferent = "C6",
|
|
IdAgence = 1,
|
|
IdBu = 2,
|
|
Fonction = "Dev",
|
|
TypeEP = TypeChamp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2017, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2018, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEP.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2018, 6, 20)
|
|
};
|
|
Ep.Add(ep);
|
|
|
|
ep = new Ep
|
|
{
|
|
IdCollaborateur = "C1",
|
|
IdReferent = "C6",
|
|
IdAgence = 1,
|
|
IdBu = 2,
|
|
Fonction = "Dev",
|
|
TypeEP = TypeChamp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2017, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2018, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEP.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2018, 6, 20)
|
|
};
|
|
Ep.Add(ep);
|
|
|
|
ep = new Ep
|
|
{
|
|
IdCollaborateur = "C1",
|
|
IdReferent = "C6",
|
|
IdAgence = 1,
|
|
IdBu = 2,
|
|
Fonction = "Dev",
|
|
TypeEP = TypeChamp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2017, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2018, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEP.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2018, 6, 20)
|
|
};
|
|
Ep.Add(ep);
|
|
ep = new Ep
|
|
{
|
|
IdCollaborateur = "C1",
|
|
IdReferent = "C6",
|
|
IdAgence = 1,
|
|
IdBu = 2,
|
|
Fonction = "Dev",
|
|
TypeEP = TypeChamp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2017, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2018, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEP.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2018, 6, 20)
|
|
};
|
|
Ep.Add(ep);
|
|
|
|
ep = new Ep
|
|
{
|
|
IdCollaborateur = "C1",
|
|
IdReferent = "C6",
|
|
IdAgence = 1,
|
|
IdBu = 2,
|
|
Fonction = "Dev",
|
|
TypeEP = TypeChamp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2017, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2018, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEP.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2018, 6, 20)
|
|
};
|
|
Ep.Add(ep);
|
|
|
|
ep = new Ep
|
|
{
|
|
IdCollaborateur = "C1",
|
|
IdReferent = "C6",
|
|
IdAgence = 1,
|
|
IdBu = 2,
|
|
Fonction = "Dev",
|
|
TypeEP = TypeChamp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2017, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2018, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEP.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2018, 6, 20)
|
|
};
|
|
Ep.Add(ep);
|
|
|
|
ep = new Ep
|
|
{
|
|
IdCollaborateur = "C1",
|
|
IdReferent = "C6",
|
|
IdAgence = 1,
|
|
IdBu = 2,
|
|
Fonction = "Dev",
|
|
TypeEP = TypeChamp.EPA,
|
|
NumeroEp = 1,
|
|
DateCreation = new DateTime(2017, 7, 7),
|
|
DatePrevisionnelle = new DateTime(2018, 7, 8),
|
|
Obligatoire = false,
|
|
Statut = StatutEP.Signe,
|
|
CV = "CV.pdf",
|
|
DateSaisie = new DateTime(2018, 6, 20)
|
|
};
|
|
Ep.Add(ep);
|
|
*/
|
|
|
|
|
|
//AVoir un tableau pour dire combien de demande de formations seront faites pour chaque EP
|
|
//Avoir un tableau pour dire combien de demande de Participation seront faites et accepter (max : 11)
|
|
//La formation associée sera choisie de manière aléatoire parmi celles créées (pas grave si la cohérence niveau date est foireuse....)
|
|
//Pour chaque demande de formation... essayer d'avoir une fois la même personne dans une formation ?... lool
|
|
this.SaveChanges();
|
|
}
|
|
|
|
|
|
public void AjoutChamps()
|
|
{
|
|
|
|
Champ c;
|
|
//CHAMPS EPS
|
|
c = new Champ { Section="Mission/Projet", Ordre = 0, Texte="Impressions générales", TypeChamp=TypeChamp.EPS, TypeSaisie=TypeSaisie.Commentaire};
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section="Mission/Projet", Ordre = 1, Texte="Faits marquants", TypeChamp=TypeChamp.EPS, TypeSaisie = TypeSaisie.Commentaire };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section="Mission/Projet", Ordre = 2, Texte="Succès", TypeChamp=TypeChamp.EPS};
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section="Mission/Projet", Ordre = 3, Texte="Retours Client/Chef de projet", TypeChamp=TypeChamp.EPS, TypeSaisie = TypeSaisie.Commentaire };
|
|
this.Champ.Add(c);
|
|
|
|
c = new Champ { Section = "Mission/Projet", Ordre = 4, Texte = "Difficultés", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Mission/Projet", Ordre = 5, Texte = "Relation Client/Chef de projet", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Mission/Projet", Ordre = 6, Texte = "Ambiance de travail", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Mission/Projet", Ordre = 7, Texte = "Intérêt technique", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Mission/Projet", Ordre = 8, Texte = "Site géographique", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
|
|
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 0, Texte = "Motivation", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 1, Texte = "Adaptabilité", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 2, Texte = "Force de proposition", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 3, Texte = "Leadership", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 4, Texte = "Ecoute", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 5, Texte = "Prise de recul", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 6, Texte = "Sens du service", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 7, Texte = "Communication", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 8, Texte = "Rigueur", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Générales", Ordre = 9, Texte = "Organisation", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Compétences", SousSection = "Compétences Techniques", Ordre = 0, Texte = "Nouvelle compétence", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Competence };
|
|
this.Champ.Add(c);
|
|
|
|
c = new Champ { Section = "Apside", Ordre = 0, Texte = "Relation avec la structure", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation};
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Apside", Ordre = 1, Texte = "Sentiment d'écoute", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation};
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Apside", Ordre = 2, Texte = "Perception de la stratégie de développement", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation};
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Apside", Ordre = 3, Texte = "Esprit d'entreprise", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation};
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Apside", Ordre = 4, Texte = "Transparence de l'information", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation};
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Apside", Ordre = 5, Texte = "Politique de formation", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation};
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Apside", Ordre = 6, Texte = "Satisfaction Apside", TypeChamp = TypeChamp.EPS, TypeSaisie = TypeSaisie.Notation};
|
|
this.Champ.Add(c);
|
|
|
|
//CHAMPS EPA
|
|
c = new Champ { Section = "Formation", Ordre = 0, Texte = "Formations effectuées", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Aucun };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Evolution Professionnelle et Salarial", Ordre = 0, Texte = "Evolution de l'emploie", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Aucun };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Projet professionnel/Souhait d’évolution ", Ordre = 0, Texte = "A court terme", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Commentaire };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Projet professionnel/Souhait d’évolution ", Ordre = 1, Texte = "A long terme", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Commentaire };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Projet professionnel/Souhait d’évolution ", Ordre = 2, Texte = "Atouts/Freins pour ce projet", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Commentaire };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Projet professionnel/Souhait d’évolution ", Ordre = 3, Texte = "Commentaire référent", TypeChamp = TypeChamp.EPA, TypeSaisie = TypeSaisie.Commentaire};
|
|
this.Champ.Add(c);
|
|
|
|
//CHAMPS EPASIX
|
|
c = new Champ { Section = "Evolution", Ordre = 1, Texte = "Evolution du salaire", TypeChamp = TypeChamp.EPASIXANS, TypeSaisie = TypeSaisie.Aucun };
|
|
this.Champ.Add(c);
|
|
/*c = new Champ { Section = "", SousSection = "", Ordre = 0, Texte = "", TypeChamp = TypeChamp.EPASIXANS };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "", SousSection = "", Ordre = 0, Texte = "", TypeChamp = TypeChamp.EPASIXANS };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "", SousSection = "", Ordre = 0, Texte = "", TypeChamp = TypeChamp.EPASIXANS };
|
|
this.Champ.Add(c);*/
|
|
|
|
//CHAMPS EVALUATION
|
|
c = new Champ { Section = "Evaluation", Ordre = 0, Texte = "Accueil et organisation", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Evaluation", Ordre = 1, Texte = "Compétences animateur", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Evaluation", Ordre = 2, Texte = "Pédagogie/Animation", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Evaluation", Ordre = 3, Texte = "Exhaustivité des sujets traités", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Evaluation", Ordre = 4, Texte = "Utilité/Apport de la formation", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Evaluation", Ordre = 5, Texte = "Contenu théorique", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Evaluation", Ordre = 6, Texte = "Contenu pratique", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Evaluation", Ordre = 7, Texte = "Equilibre pratique/théorie", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Evaluation", Ordre = 8, Texte = "Support de cours", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
c = new Champ { Section = "Evaluation", Ordre = 9, Texte = "Durée", TypeChamp = TypeChamp.Evaluation, TypeSaisie = TypeSaisie.Notation };
|
|
this.Champ.Add(c);
|
|
|
|
|
|
this.SaveChanges();
|
|
}
|
|
|
|
public void AjouterNotes()
|
|
{
|
|
Note note;
|
|
note = new Note()
|
|
{
|
|
Id = 1,
|
|
Titre = "Titre1",
|
|
Texte = "Texte1",
|
|
IdAuteur = new Guid("ecf528c3-e509-402f-87bb-c8821467e350"),
|
|
IdCollaborateur = new Guid("779bf1cf-4d38-48fb-8550-3d583384523b"),
|
|
DateCreation = DateTime.Now,
|
|
DateUpdate = DateTime.Now
|
|
|
|
};
|
|
this.Note.Add(note);
|
|
note = new Note()
|
|
{
|
|
Id = 2,
|
|
Titre = "Titre2",
|
|
Texte = "Texte2",
|
|
IdAuteur = new Guid("ecf528c3-e509-402f-87bb-c8821467e350"),
|
|
IdCollaborateur = new Guid("779bf1cf-4d38-48fb-8550-3d583384523b"),
|
|
DateCreation = DateTime.Now,
|
|
DateUpdate = DateTime.Now
|
|
|
|
};
|
|
this.Note.Add(note);
|
|
note = new Note()
|
|
{
|
|
Id = 3,
|
|
Titre = "Titre3",
|
|
Texte = "Texte3",
|
|
IdAuteur = new Guid("ecf528c3-e509-402f-87bb-c8821467e350"),
|
|
IdCollaborateur = new Guid("779bf1cf-4d38-48fb-8550-3d583384523b"),
|
|
DateCreation = DateTime.Now,
|
|
DateUpdate = DateTime.Now
|
|
|
|
};
|
|
this.Note.Add(note);
|
|
note = new Note()
|
|
{
|
|
Id = 4,
|
|
Titre = "Titre4",
|
|
Texte = "Texte4",
|
|
IdAuteur = new Guid("ecf528c3-e509-402f-87bb-c8821467e350"),
|
|
IdCollaborateur = new Guid("006226f6-51b2-4a02-a302-7447f7fccc04"),
|
|
DateCreation = DateTime.Now,
|
|
DateUpdate = DateTime.Now
|
|
|
|
};
|
|
this.Note.Add(note);
|
|
note = new Note()
|
|
{
|
|
Id = 5,
|
|
Titre = "Titre5",
|
|
Texte = "Texte5",
|
|
IdAuteur = new Guid("ecf528c3-e509-402f-87bb-c8821467e350"),
|
|
IdCollaborateur = new Guid("006226f6-51b2-4a02-a302-7447f7fccc04"),
|
|
DateCreation = DateTime.Now,
|
|
DateUpdate = DateTime.Now
|
|
|
|
};
|
|
this.Note.Add(note);
|
|
note = new Note()
|
|
{
|
|
Id = 6,
|
|
Titre = "Titre6",
|
|
Texte = "Texte6",
|
|
IdAuteur = new Guid("6aa62dcb-f7c9-4c0c-af40-e934a4d6a7eb"),
|
|
IdCollaborateur = new Guid("006226f6-51b2-4a02-a302-7447f7fccc04"),
|
|
DateCreation = DateTime.Now,
|
|
DateUpdate = DateTime.Now
|
|
|
|
};
|
|
this.Note.Add(note);
|
|
note = new Note()
|
|
{
|
|
Id = 7,
|
|
Titre = "Titre7",
|
|
Texte = "Texte7",
|
|
IdAuteur = new Guid("6aa62dcb-f7c9-4c0c-af40-e934a4d6a7eb"),
|
|
IdCollaborateur = new Guid("006226f6-51b2-4a02-a302-7447f7fccc04"),
|
|
DateCreation = DateTime.Now,
|
|
DateUpdate = DateTime.Now
|
|
|
|
};
|
|
this.Note.Add(note);
|
|
|
|
note = new Note()
|
|
{
|
|
Id = 8,
|
|
Titre = "Titre8",
|
|
Texte = "Texte8",
|
|
IdAuteur = new Guid("571463f3-b286-4a21-9eab-0707dc506dec"),
|
|
IdCollaborateur = new Guid("006226f6-51b2-4a02-a302-7447f7fccc04"),
|
|
DateCreation = DateTime.Now,
|
|
DateUpdate = DateTime.Now
|
|
|
|
};
|
|
this.Note.Add(note);
|
|
note = new Note()
|
|
{
|
|
Id = 9,
|
|
Titre = "Titre9",
|
|
Texte = "Texte9",
|
|
IdAuteur = new Guid("571463f3-b286-4a21-9eab-0707dc506dec"),
|
|
IdCollaborateur = new Guid("006226f6-51b2-4a02-a302-7447f7fccc04"),
|
|
DateCreation = DateTime.Now,
|
|
DateUpdate = DateTime.Now
|
|
|
|
};
|
|
this.Note.Add(note);
|
|
note = new Note()
|
|
{
|
|
Id = 10,
|
|
Titre = "Titre10",
|
|
Texte = "Texte10",
|
|
IdAuteur = new Guid("6aa62dcb-f7c9-4c0c-af40-e934a4d6a7eb"),
|
|
IdCollaborateur = new Guid("006226f6-51b2-4a02-a302-7447f7fccc04"),
|
|
DateCreation = DateTime.Now,
|
|
DateUpdate = DateTime.Now
|
|
|
|
};
|
|
this.Note.Add(note);
|
|
this.SaveChanges();
|
|
}
|
|
}
|
|
}
|
|
|