Exemplo n.º 1
0
 public void UpdateTeamList(object sender, EventArgs e)
 {
     TeamList.Clear();
     using (var sqlcmd = new SqlCommandExecutor("EXEC pr_GetTeams"))
         using (var sqlReader = sqlcmd.ExecuteReader())
         {
             while (sqlReader.Read())
             {
                 TeamList.Add(new TeamEntry
                 {
                     Inventory   = sqlReader.GetInt16(0).ToString(),
                     Team        = sqlReader.GetInt16(1).ToString(),
                     PeopleCount = sqlReader.GetInt16(2).ToString(),
                     IsComplete  = sqlReader.GetBoolean(3)
                 });
             }
         }
 }