Exemplo n.º 1
0
 public void log(string message, int taskId)
 {
     if (taskId == 0)
     {
         return;
     }
     ProInterface.Models.SCRIPT_TASK_LOG ent = new SCRIPT_TASK_LOG();
     ent.SCRIPT_TASK_ID = taskId;
     ent.LOG_TIME       = DateTime.Now;
     ent.MESSAGE        = message;
     FunSqlToClass.Save <ProInterface.Models.SCRIPT_TASK_LOG>(ConfigurationManager.AppSettings["dbType"], ConfigurationManager.AppSettings["dbConnSt"], ent, ConfigurationManager.AppSettings["dbPrefix"]);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 写日志
 /// </summary>
 /// <param name="message"></param>
 /// <param name="sql_text"></param>
 /// <param name="logType"></param>
 public void log(string message, string sql_text = "", Int16 logType = 0)
 {
     try
     {
         if (!IsRun())
         {
             return;
         }
         if (_taskId == 0)
         {
             return;
         }
         ProInterface.Models.SCRIPT_TASK_LOG ent = new SCRIPT_TASK_LOG();
         ent.SCRIPT_TASK_ID = _taskId;
         ent.LOG_TIME       = DateTime.Now;
         ent.LOG_TYPE       = logType;
         ent.MESSAGE        = message;
         ent.SQL_TEXT       = sql_text;
         FunSqlToClass.Save <ProInterface.Models.SCRIPT_TASK_LOG>(ConfigurationManager.AppSettings["dbType"], ConfigurationManager.AppSettings["dbConnSt"], ent, ConfigurationManager.AppSettings["dbPrefix"]);
     }
     catch { }
 }