Exemplo n.º 1
0
 public void ExceptionLogInsert(string exceptionText, string pageName, string methodName, int?userId, int?siteId, string transSql, string httpReferrer)
 {
     using (var db = new DBAMPContext())
     {
         int?exceptionLogId;
         exceptionLogId = db.ApiExceptionLogInsert(exceptionText, pageName, methodName, userId, siteId, transSql, httpReferrer, out exceptionLogId);
     }
 }
Exemplo n.º 2
0
        int IActionTracking.AddAppExceptionLog(string exceptionText, string pageName, string methodName, int?userId, int?siteId, string transSql, string httpReferrer)
        {
            int _result;
            int?_exceptionLogId = 0;

            using (var db = new DBAMPContext())
            {
                try
                {
                    _result = db.ApiExceptionLogInsert(exceptionText, pageName, methodName, userId, siteId, transSql, httpReferrer, out _exceptionLogId);
                }
                catch (Exception ex)
                {
                    string sqlParam    = "AddAppExceptionLog(" + exceptionText + "," + pageName + "," + methodName + "," + userId + "," + siteId + "," + transSql + "," + httpReferrer + "," + ")";
                    string sMethodName = "JCRAPI/Business/IActionTracking/AddAppExceptionLog";
                    exceptionLog.ExceptionLogInsert(ex.Message.ToString(), "", sMethodName, userId, siteId, sqlParam, string.Empty);

                    return(0);
                }
            }
            return(_result);
        }