/// <summary> /// /// </summary> /// <param name="exc"></param> public static void LogDBErrorInfo(Exception exc) { string obj = string.Empty; try { ExceptionInfo exinfo = Exceptions.GetExceptionInfo(exc); DBErrorPage DALerr = new DBErrorPage(); string strMethod = exinfo.Method.Replace(exinfo.PageName, ""); strMethod = strMethod.Replace("..", "").Trim(); //string strPageName = System.Web.HttpContext.Current.Request.Url.AbsolutePath.ToString(); string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath; System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath); string strPageName = oInfo.Name; obj = Convert.ToString(DALerr.DBInsertErrorInfo(exinfo.Error, strPageName, strMethod, exinfo.FileLineNumber, exinfo.FileColumnNumber, exinfo.FileName, DateTime.Now)); // obj = Convert.ToString(DALerr.DBInsertErrorInfo(exinfo.Error, exinfo.PageName, strMethod, exinfo.FileLineNumber, exinfo.FileColumnNumber, exinfo.FileName, DateTime.Now)); } catch (Exception ex) { ErrorLog.WriteError(ex); } finally { } }
/// <summary> /// /// </summary> /// <param name="exinfo"></param> public static void LogDBErrorInfo(ExceptionInfo exinfo) { string obj = string.Empty; try { DBErrorPage DALerr = new DBErrorPage(); obj = Convert.ToString(DALerr.DBInsertErrorInfo(exinfo.Error, exinfo.PageName, exinfo.Method, exinfo.FileLineNumber, exinfo.FileColumnNumber, exinfo.FileName, DateTime.Now)); } catch (Exception ex) { ErrorLog.WriteError(ex); } finally { } }
/// <summary> /// /// </summary> /// <param name="strError"></param> /// <param name="strPageName"></param> /// <param name="strMethodName"></param> /// <param name="intFileLineNumber"></param> /// <param name="intFileColumnNumber"></param> /// <param name="strSource"></param> /// <param name="date"></param> public static void LogDBErrorInfo(string strError, string strPageName, string strMethodName, int intFileLineNumber, int intFileColumnNumber, string strSource, DateTime date) { string obj = string.Empty; try { DBErrorPage DALerr = new DBErrorPage(); string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath; System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath); strPageName = oInfo.Name; obj = Convert.ToString(DALerr.DBInsertErrorInfo(strError, strPageName, strMethodName, intFileLineNumber, intFileColumnNumber, strSource, date)); } catch (Exception ex) { ErrorLog.WriteError(ex); } finally { } }