Corrigido
Alterei o
total = Convert.ToInt32(reader["total"]);
por
total = reader["total"] != DBNull.Value ? Convert.ToInt32(reader["total"]) : 0;
↧