public static List<RvGameGridRow> ReadGames(int datId) { List<RvGameGridRow> rows = new List<RvGameGridRow>(); SQLRead.Parameters["DatId"].Value = datId; using (SQLiteDataReader dr = SQLRead.ExecuteReader()) { while (dr.Read()) { RvGameGridRow gridRow = new RvGameGridRow(); gridRow.GameId = System.Convert.ToInt32(dr["GameID"]);; gridRow.Name = dr["name"].ToString(); gridRow.Description =dr["description"].ToString(); gridRow.RomGot = System.Convert.ToInt32(dr["RomGot"]); gridRow.RomTotal = System.Convert.ToInt32(dr["RomTotal"]); gridRow.RomNoDump = System.Convert.ToInt32(dr["RomNoDump"]); rows.Add(gridRow); } dr.Close(); } return rows; }
public static List <RvGameGridRow> ReadGames(int datId) { List <RvGameGridRow> rows = new List <RvGameGridRow>(); SQLRead.Parameters["DatId"].Value = datId; using (SQLiteDataReader dr = SQLRead.ExecuteReader()) { while (dr.Read()) { RvGameGridRow gridRow = new RvGameGridRow(); gridRow.GameId = System.Convert.ToInt32(dr["GameID"]);; gridRow.Name = dr["name"].ToString(); gridRow.Description = dr["description"].ToString(); gridRow.RomGot = System.Convert.ToInt32(dr["RomGot"]); gridRow.RomTotal = System.Convert.ToInt32(dr["RomTotal"]); gridRow.RomNoDump = System.Convert.ToInt32(dr["RomNoDump"]); rows.Add(gridRow); } dr.Close(); } return(rows); }