title: Showing two same datas on datagrid
body: <p>[SOLVED], gzaxx's answer.</p>
  
  <p>Even though in the database a member is not inserted two times, in the datagrid it is showing two times!
  I have this Form that I add members, and another Form where I add member's payments. When I add more than 1 payment to a member, that members shows two times in the grid. </p>
  
  <p>To List Members I'm using this: </p>
  
  <pre><code>        public List&lt;Member&gt; ListMembers()
          {
              List&lt;Member&gt; Members = new List&lt;Member&gt;();
  
  
              string STATUS = "SELECT m.Id, m.Name,m.Surname, m.EntryDate, p.EndDay FROM Members m left join Payments p on m.Id = p.MemberId order by m.Id ";
              using (sqlConnection = new SqlConnection(sqlConnectionString_WORK))
              {
                  sqlConnection.Open();
  
                  using (SqlCommand sqlCommand = new SqlCommand(STATUS, sqlConnection))
                  {
                      var sqlReader = sqlCommand.ExecuteReader();
  
                      while (sqlReader.Read())
                      {
                          var member = new Member
                          {
                              Id = Convert.ToInt32(sqlReader["Id"]),
                              Name = sqlReader["Name"].ToString(),
                              Surname = sqlReader["Surname"].ToString(),
                              EntryDate = Convert.ToDateTime(sqlReader["EntryDate"])
                          };
  
                          if (sqlReader["EndDay"].ToString() != "")
                          if (Convert.ToDateTime(sqlReader["EndDay"]) &lt; DateTime.Today)
                          {
                              member.Status = Status.Unpaid.ToString();
                          }
  
                          else
                          {
                              member.Status = Status.Paid.ToString();
                          }
  
                          Members.Add(member);
                      }
                  }
              }
  
              return Members;
          }
  </code></pre>
  
  <p>For Payments :</p>
  
  <pre><code>        public List&lt;Payment&gt; ListPayments(Payment entity)
          {
              List&lt;Payment&gt; Payments = new List&lt;Payment&gt;();
  
              string SELECT = "SELECT * FROM Payments WHERE MemberId = @MemberId";
  
              using (sqlConnection = new SqlConnection(sqlConnectionString_WORK))
              {
                  sqlConnection.Open();
  
                  using (SqlCommand sqlCommand = new SqlCommand(SELECT, sqlConnection))
                  {
                      sqlCommand.Parameters.Add("@MemberId", SqlDbType.Int).Value = entity.MemberId;
  
                      var sqlReader = sqlCommand.ExecuteReader();
  
                      while (sqlReader.Read())
                      {
                          var payment = new Payment
                          {
                              Id = Convert.ToInt32(sqlReader["Id"]),
                              MemberId = Convert.ToInt32(sqlReader["MemberId"]),
                              Amount = Convert.ToDecimal(sqlReader["Amount"]),
                              StartDay = Convert.ToDateTime(sqlReader["StartDay"]),
                              EndDay = Convert.ToDateTime(sqlReader["EndDay"])
                          };
  
                          Payments.Add(payment);
                      }
                  }
              }
  
              return Payments;
          }
  </code></pre>
  
  <p>If a members doesn't have a payment, it will show NOTHING to it's Status column. If a members have ONE payment, it will show its status. But if I add a NEW payment (more than ONE), data grid will show the same member equal to its payments on the grid. What Am I doing wrong ???</p>