public int ExecuteUpdate(string commandText)
 {
     if (DbType == DatabaseType.MSSqlServer)
     {
         return(SqlServerConnection.ExecuteUpdate(commandText));
     }
     else if (DbType == DatabaseType.SqLite)
     {
         return(SqliteConnection.Instance.ExecuteUpdate(commandText));
     }
     else
     {
         throw new ArgumentException();
     }
 }
        /// <summary>
        /// 清除所有缓存并提交到数据库,自定义Cache文件路径
        /// </summary>
        /// <returns></returns>
        public static int CleanDbAndExecuteTasks(string cacheFilename)
        {
            int effectedRows = 0;

            string[] commands = GetAllLines(cacheFilename);
            if (commands == null)
            {
                return(-1);
            }

            foreach (string str in commands)
            {
                int tmp = SqlServerConnection.ExecuteUpdate(str);
                effectedRows += tmp > 0 ? tmp : 0;
            }
            File.Delete(cacheFilename);
            return(effectedRows);
        }