Celine.meneu 16 years ago
parent
commit
c2777c415e

+ 2 - 2
CG67.FicheCollege.root/CG67.FicheCollege/Core/CG67.FicheCollege.Entrepot/EntrepotDotation.cs

@@ -26,14 +26,14 @@ namespace CG67.FicheCollege.Entrepot
                     connexion.Open();
                     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("@Annee", annee);
                         using (SqlDataReader dr = command.ExecuteReader())
                         {
                             while (dr.Read())
                             {
-                                switch (dr["Type"].ToString())
+                                switch (dr["Libelle"].ToString())
                                 {
                                     case "Viabilisation":
                                         resultat.Viabilisation = Convert.ToDouble(dr["Montant"].ToString());