|
|
@@ -99,6 +99,17 @@ namespace CG67.FicheCollege.Entrepot
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ command.CommandText = "SELECT * from SecteurRecrutement WHERE CodeRNE = @RNE and Annee=@annee";
|
|
|
+ using (SqlDataReader dr7 = command.ExecuteReader())
|
|
|
+ {
|
|
|
+ IList<EtablissementRecrutement> lstSecteurRecrut = new List<EtablissementRecrutement>();
|
|
|
+ while (dr7.Read())
|
|
|
+ {
|
|
|
+ lstSecteurRecrut.Add(new EtablissementRecrutement(dr7["Libelle"].ToString()));
|
|
|
+ }
|
|
|
+ resultat.LstSecteurRecrutement = lstSecteurRecrut;
|
|
|
+ }
|
|
|
+
|
|
|
command.CommandText = "SELECT * FROM Reserve WHERE CodeRNE = @RNE AND Annee = @Annee";
|
|
|
using (SqlDataReader dr3 = command.ExecuteReader())
|
|
|
{
|
|
|
@@ -112,12 +123,31 @@ namespace CG67.FicheCollege.Entrepot
|
|
|
command.Parameters.AddWithValue("@AnneeMoins10", annee - 10);
|
|
|
using (SqlDataReader dr4 = command.ExecuteReader())
|
|
|
{
|
|
|
+ resultat.LstEffectif = new List<Effectif>();
|
|
|
IList<Effectif> lstEffectifReel = new List<Effectif>();
|
|
|
while (dr4.Read())
|
|
|
{
|
|
|
lstEffectifReel.Add(new Effectif(dr4["Annee"].ToString(),dr4["TypeDonnees"].ToString(), Convert.ToInt32(dr4["EffectifTotal"].ToString())));
|
|
|
}
|
|
|
- resultat.LstEffectif = lstEffectifReel;
|
|
|
+
|
|
|
+ foreach (Effectif e in lstEffectifReel)
|
|
|
+ {
|
|
|
+ if (e.TypeEffectif == "R")
|
|
|
+ resultat.LstEffectif.Add(e);
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach (Effectif e in lstEffectifReel)
|
|
|
+ {
|
|
|
+ bool trouve = false;
|
|
|
+ if (e.TypeEffectif == "P")
|
|
|
+ {
|
|
|
+ foreach (Effectif e1 in resultat.LstEffectif)
|
|
|
+ if (e1.Annee == e.Annee)
|
|
|
+ trouve = true;
|
|
|
+ if (!trouve)
|
|
|
+ resultat.LstEffectif.Add(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -133,17 +163,7 @@ namespace CG67.FicheCollege.Entrepot
|
|
|
resultat.LstRestructuration = lstRestructuration;
|
|
|
}
|
|
|
|
|
|
- command.CommandText = "SELECT * from SecteurRecrutement WHERE CodeRNE = @RNE";
|
|
|
- using (SqlDataReader dr7 = command.ExecuteReader())
|
|
|
- {
|
|
|
- IList<string> lstSecteurRecrut = new List<string>();
|
|
|
- while (dr7.Read())
|
|
|
- {
|
|
|
- lstSecteurRecrut.Add(dr7["Libelle"].ToString());
|
|
|
- }
|
|
|
- resultat.LstSecteurRecrutement = lstSecteurRecrut;
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
command.CommandText = "SELECT * from Remplacement INNER JOIN ATC ON (ATC.Id = Remplacement.IdATCRemplace) INNER JOIN Contact ON (ATC.Id = Contact.Id) WHERE CodeRNE = @RNE AND Remplacement.DateDebut + DureeEnSemaine >= GETDATE()";
|
|
|
using (SqlDataReader dr8 = command.ExecuteReader())
|
|
|
{
|
|
|
@@ -154,6 +174,9 @@ namespace CG67.FicheCollege.Entrepot
|
|
|
}
|
|
|
resultat.NbrRemplacementsATC = nbrRemplacements;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
//catch
|