private string GetBody(LogWriter olw,string strSql) { string strBody = "<html><body>"; Queue<Log> oQ = olw.GetLogs(); while (oQ.Count > 0) { Log ol = oQ.Dequeue(); strBody = strBody + "<p>"; strBody = strBody + "<p>Country " + ol.CountryCode + "<br/>"; if (ol.Message.ToUpper().StartsWith("ERR")) { strBody = strBody + "<span style='color:red'>" + ol.Message + "</span></p><br/>"; } else { strBody = strBody + ol.Message + "</p><br/>"; } } strBody = strBody + "<br/><p>Executed SQL " + strSql.Replace("\n", "<br/>").Replace("\r", "") + "<br/>"; return strBody; }
public SqlRunner() { InitializeComponent(); olw = LogWriter.Instance; osm = new SendMail(); }