private void PopulateDistributionEmailsSortedList(SqlDataReader reader) { if (ContactID == 0) { SLEmail = new SortedList(); } SLEmailBody = new SortedList(); SLEmailHeader = new SortedList(); while (reader.Read()) { if (ContactID == 0) { if (SLEmail.Contains(reader["CustClientID"])) { if (reader["Email"] != "" && !reader["Email"].ToString().Contains("jetfuelx")) { SLEmail[reader["CustClientID"]] += ";" + reader["Email"]; } } else { int clientid = 0; if (reader["Email"] != "" && !reader["Email"].ToString().Contains("jetfuelx")) { clientid = int.Parse(reader["CustClientID"].ToString()); } SLEmail.Add(clientid, reader["email"]); } } } if (reader.NextResult()) { while (reader.Read()) { SLEmailBody.Add(reader["Id"], reader["Note"]); } } if (reader.NextResult()) { while (reader.Read()) { SLEmailHeader.Add(reader["CustClientID"], reader["Name"]); } } ExecutionHelper.CloseReader(reader); }