public List <WebLogTable> Query2(WebLogTableData data) { string command = ""; #region # sql command # command = " SELECT " + "wl.WebLogID, " + "wl.Date, " + "wl.Logger, " + "wl.Message, " + "wl.Exception, " + "wl.Method, " + "wl.Line " + " FROM MobilePaywallLog.log.WebLogUserSessionMap AS map " + " LEFT OUTER JOIN MobilePaywallLog.log.WebLog AS wl ON map.WebLogID=wl.WebLogID " + " WHERE map.UserSessionID=" + data.SessionID + " AND " + " map.Created >= '" + data.From + "' AND map.Created <= '" + data.To + "' " + " ORDER BY wl.WebLogID ASC; "; #endregion this._result = new List <WebLogTable>(); MobilePaywallLogDirect database = MobilePaywallLogDirect.Instance; database.SetTimeout(0); DataTable table = database.Load(command); if (table == null) { return(this._result); } foreach (DataRow row in table.Rows) { WebLogTable tableRow = new WebLogTable(); tableRow.ID = row[(int)WebLogColumns.ID].ToString(); tableRow.Date = row[(int)WebLogColumns.Date].ToString(); tableRow.Logger = row[(int)WebLogColumns.Logger].ToString(); tableRow.Message = row[(int)WebLogColumns.Message].ToString(); string exeption = row[(int)WebLogColumns.Exception].ToString(); if (!string.IsNullOrEmpty(exeption)) { tableRow.Message += Environment.NewLine + Environment.NewLine + "<<<<<<<<<<<<<<<<: EXCEPTION:" + Environment.NewLine + exeption; } tableRow.Method = row[(int)WebLogColumns.Method].ToString(); tableRow.Line = row[(int)WebLogColumns.Line].ToString(); this._result.Add(tableRow); } return(this._result); }
private void CreateLog() { db = MobilePaywallLogDirect.Instance; this._logID = this.db.Execute("INSERT INTO MobilePaywallLog.log.CCSubmitLog (Url) VALUES ('" + HttpContext.Request.RawUrl.ToString() + "');"); }