public bool IsRead(long messageId, string carveIds) { t_web_text_relationshipTableAdapter adapter = new t_web_text_relationshipTableAdapter(); DataTable dt = adapter.up_SignetInternet_WebMessageSelectByMessageCarves(messageId, carveIds); if (dt == null || dt.Rows.Count == 0) { return(true); } else { bool isread = true; foreach (DataRow row in dt.Rows) { isread = isread && bool.Parse(row["IsRead"].ToString()); } return(isread); } }