예제 #1
0
파일: SQL.cs 프로젝트: jmptrader/UIFS
 public void WriteLog(string Msg)
 {
     string username = WindowsIdentity.GetCurrent().Name;
     SQL ErrSQL = new SQL(ConfigurationManager.AppSettings["UIFS.Log"].ToString());
     ErrSQL.OpenDatabase();
     ErrSQL.Query = string.Format(ErrSQL.SQLQuery.WriteLOG, 0, ErrSQL.ParseInput(Msg), username);
     ErrSQL.cmd = ErrSQL.Command(ErrSQL.Data);
     ErrSQL.cmd.ExecuteNonQuery();
     ErrSQL.CloseDatabase();
     ErrSQL = null;
 }
예제 #2
0
파일: SQL.cs 프로젝트: jmptrader/UIFS
 // Logging routines are specific to UIFS of course.  As long as the user has provided the "UIFS.Log" appsetting in web.config, the errors
 // will be logged in the user's database of choice.
 public void WriteLog_Error(Exception ex, string ErrorMsg, string CodeLocation)
 {
     string username =  WindowsIdentity.GetCurrent().Name;
     SQL ErrSQL = new SQL(ConfigurationManager.AppSettings["UIFS.Log"].ToString());
     ErrSQL.OpenDatabase();
     ErrSQL.Query = string.Format(ErrSQL.SQLQuery.WriteLOG_AppError, -1, ErrSQL.ParseInput(ErrorMsg), username, ErrSQL.ParseInput(ex.Message), ErrSQL.ParseInput(ex.Source), ErrSQL.ParseInput(ex.StackTrace), CodeLocation);
     ErrSQL.cmd = ErrSQL.Command(ErrSQL.Data);
     ErrSQL.cmd.ExecuteNonQuery();
     ErrSQL.CloseDatabase();
     ErrSQL = null;
 }