|
@@ -26,14 +26,14 @@ namespace CG67.FicheCollege.Entrepot
|
|
|
connexion.Open();
|
|
connexion.Open();
|
|
|
using (SqlCommand command = connexion.CreateCommand())
|
|
using (SqlCommand command = connexion.CreateCommand())
|
|
|
{
|
|
{
|
|
|
- command.CommandText = "Select * from Dotation WHERE CodeRNE = @RNE AND Annee = @Annee";
|
|
|
|
|
|
|
+ command.CommandText = "Select * from Dotation INNER JOIN TypeDotation ON IdDotation = id WHERE CodeRNE = @RNE AND Annee = @Annee";
|
|
|
command.Parameters.AddWithValue("@RNE", codeRNE);
|
|
command.Parameters.AddWithValue("@RNE", codeRNE);
|
|
|
command.Parameters.AddWithValue("@Annee", annee);
|
|
command.Parameters.AddWithValue("@Annee", annee);
|
|
|
using (SqlDataReader dr = command.ExecuteReader())
|
|
using (SqlDataReader dr = command.ExecuteReader())
|
|
|
{
|
|
{
|
|
|
while (dr.Read())
|
|
while (dr.Read())
|
|
|
{
|
|
{
|
|
|
- switch (dr["Type"].ToString())
|
|
|
|
|
|
|
+ switch (dr["Libelle"].ToString())
|
|
|
{
|
|
{
|
|
|
case "Viabilisation":
|
|
case "Viabilisation":
|
|
|
resultat.Viabilisation = Convert.ToDouble(dr["Montant"].ToString());
|
|
resultat.Viabilisation = Convert.ToDouble(dr["Montant"].ToString());
|