|
|
@@ -48,8 +48,9 @@ namespace CG67.FicheCollege.Entrepot
|
|
|
//}
|
|
|
//command.CommandText = "SELECT sum(TotalEleves) as totalEleves FROM Effectif WHERE Effectif.Annee = @Annee";
|
|
|
//command.CommandText ="SELECT Sum(EffectifTotal.EffectifTotal) AS SommeDeEffectifTotal FROM EffectifTotal GROUP BY EffectifTotal.Annee HAVING (((EffectifTotal.Annee)=@Annee) AND (Typedonnees='R'))";
|
|
|
- command.CommandText = "SELECT Sum(EffectifTotal.EffectifTotal) AS SommeDeEffectifTotal FROM EffectifTotal WHERE Annee = @Annee AND Typedonnees = 'R'";
|
|
|
- command.Parameters.AddWithValue("@Annee", annee);
|
|
|
+ //command.CommandText = "SELECT Sum(EffectifTotal.EffectifTotal) AS SommeDeEffectifTotal FROM EffectifTotal WHERE Annee = @Annee ";
|
|
|
+ command.CommandText = "SELECT Sum(EffectifTotal.EffectifTotal) AS SommeDeEffectifTotal FROM EffectifTotal GROUP BY EffectifTotal.Annee, EffectifTotal.Typedonnees HAVING (EffectifTotal.Annee = @Annee) AND (EffectifTotal.TypeDonnees = 'R') ";
|
|
|
+ //command.Parameters.AddWithValue("@Annee", annee);
|
|
|
sum = command.ExecuteScalar().ToString();
|
|
|
resultat.NbTotalEleves = string.IsNullOrEmpty(sum) ? (Int32) 0 : Convert.ToInt32 (sum);
|
|
|
|