/// <summary> /// 对外接口:添加一条Task流水日期映射表 /// </summary> /// <param name="nTaskID"></param> /// <param name="time"></param> public bool AddTaskTimeLog(int nTaskID, DateTime time) { try { FKSQLiteLogTimeNode node = new FKSQLiteLogTimeNode(); node.TaskId = nTaskID; node.LogTime = time.ToString("yyyy-MM-dd"); return(AddTaskTimeLogToDB(node)); } catch (Exception e) { Console.WriteLine($"[Error] Add task time log 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); } }