|
|
@@ -20,7 +20,8 @@ namespace CG67.FicheCollege.Entrepot
|
|
|
connexion.Open();
|
|
|
using (SqlCommand command = connexion.CreateCommand())
|
|
|
{
|
|
|
- command.CommandText = "SELECT FonctionLocataire FROM Logement INNER JOIN Logement_Contact ON (Logement.Id = Logement_Contact.IdLogement) WHERE (Logement.CodeRNE= @RNE)";
|
|
|
+// command.CommandText = "SELECT FonctionLocataire FROM Logement INNER JOIN Logement_Contact ON (Logement.Id = Logement_Contact.IdLogement) WHERE (Logement.CodeRNE= @RNE)";
|
|
|
+ command.CommandText = "SELECT FonctionOccupantReel FROM Logement WHERE (Logement.CodeRNE= @RNE)";
|
|
|
command.Parameters.AddWithValue("@RNE", codeRNE);
|
|
|
using (SqlDataReader dr = command.ExecuteReader())
|
|
|
{
|
|
|
@@ -29,8 +30,9 @@ namespace CG67.FicheCollege.Entrepot
|
|
|
while (dr.Read())
|
|
|
{
|
|
|
NbrLogements = NbrLogements + 1 ;
|
|
|
-
|
|
|
- if (dr["FonctionLocataire"].ToString().Contains("ATC"))
|
|
|
+
|
|
|
+ if (dr["FonctionOccupantReel"].ToString().Contains("ATC"))
|
|
|
+ // if (dr["FonctionLocataire"].ToString().Contains("ATC"))
|
|
|
NbrAgents=NbrAgents + 1 ;
|
|
|
}
|
|
|
|