Beispiel #1
0
 /// <summary>
 /// 对外接口:添加一条DB Log记录
 /// </summary>
 /// <param name="node"></param>
 public bool AddLogToDB(FKSQLiteLogNode node)
 {
     try
     {
         if (!IsDBFileExistByTime(node.LogTime))
         {
             m_DBObject = CreateDBFileByTime(node.LogTime);
         }
         return(m_DBObject.Insert(node) > 0);
     }
     catch (Exception e)
     {
         Console.WriteLine($"[Error] Add log to Failed. Error = {e.ToString()}");
         return(false);
     }
 }
 /// <summary>
 /// 添加一条Task流水日期映射表
 /// </summary>
 /// <param name="node"></param>
 private bool AddTaskTimeLogToDB(FKSQLiteLogTimeNode node)
 {
     try
     {
         if (!IsDBFileExist(FKLogConsts.SQLITE_LOG_TASK_TIME_FILE_NAME))
         {
             m_SQLiteObject = CreateDBFile(FKLogConsts.SQLITE_LOG_TASK_TIME_FILE_NAME);
         }
         return(m_SQLiteObject.Insert(node) > 0);
     }
     catch (Exception e)
     {
         Console.WriteLine($"[Error] Add task time log to DB Failed. Error = {e.ToString()}");
         return(false);
     }
 }