title: DataGridview result of query 0
body: <p>does anyone know why I throws out zero as a result in datagridview, while my entire query code is correct .. This is my code below ..</p>
  
  <pre><code>boAPI4.Login login = new boAPI4.Login();
  string cS = login.GetConnectionString();
  DataAccess dA = new DataAccess(cS);
  int userID = dA.getLpeID(login.GetBoUserNr());
  PRAESENZZEIT q = new PRAESENZZEIT();
  q.ZPZ_LPE_ID = userID;
  if (db.State == ConnectionState.Closed)
      db.Open();
  string query = "SELECT per.LPE_Nr, zei.ZPZ_LPE_ID, zei.ZPZ_Datum, SUM (zei.ZPZ_Std100) AS Stunden" +
                 " FROM DB.dbo.Z_PRAESENZZEIT zei INNER JOIN DB.dbo.A_PERSONAL per ON zei.ZPZ_LPE_ID = per.LPE_ID" +
                  $" WHERE zei.ZPZ_Datum BETWEEN '{dtFromDate.Value}' AND '{dtToDate.Value}' AND zei.ZPZ_LPE_ID='{userID.ToString()}' GROUP BY per.LPE_Nr, zei.ZPZ_LPE_ID, zei.ZPZ_Datum ORDER BY zei.ZPZ_Datum, per.LPE_Nr;";
  pRAESENZZEITBindingSource.DataSource = db.Query&lt;PRAESENZZEIT&gt;(query, commandType: CommandType.Text);
  </code></pre>
  
  <p>and this is the same query that should be written in datagridview </p>
  
  <pre><code>  SELECT per.LPE_Nr, zei.ZPZ_LPE_ID, zei.ZPZ_Datum, SUM (zei.ZPZ_Std100) AS Stunden FROM DB.dbo.Z_PRAESENZZEIT zei INNER JOIN DB.dbo.A_PERSONAL per ON zei.ZPZ_LPE_ID = per.LPE_ID WHERE zei.ZPZ_Datum BETWEEN '16.12.2014 13:56:00' AND '18.12.2017 15:15:17'AND zei.ZPZ_LPE_ID='196' GROUP BY per.LPE_Nr, zei.ZPZ_LPE_ID, zei.ZPZ_Datum ORDER BY zei.ZPZ_Datum, per.LPE_Nr;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ZctJg.png" alt="[This is my result in base and datagridview]"></p>
  
  <p>definition of class PRAESENZZEIT</p>
  
  <pre><code> public class PRAESENZZEIT
  {
      public int LPE_Nr { get; set; }
      public DateTime ZPZ_Datum { get; set; }
      public double ZPZ_Std100 { get; set; }
      public int ZPZ_LPE_ID { get; set; }
  
      public DateTime ZPZ_Von { get; set; }
      public DateTime ZPZ_Bis { get; set; }
      public DateTime ZPZ_Std { get; set; }
  
      public int ZPZ_ID { get; set; }
      public int ZPZ_Jahr { get; set; }
      public int ZPZ_Monat { get; set; }
      public int ZPZ_Tag { get; set; }
      public DateTime ZPZ_ERFDAT { get; set; }
      public string ZPZ_ERFUSER { get; set; }
      public DateTime ZPZ_MUTDAT { get; set; }
      public string ZPZ_MUTUSER { get; set; }
  }
  </code></pre>