/// <summary>
        /// 删除过时的AIS数据操作
        /// </summary>
        private static void DeleteAISdata(MySql.Data.MySqlClient.MySqlConnection connection, AisControl controlObject)
        {
            // 开始事务处理
            MySql.Data.MySqlClient.MySqlTransaction transaction = connection.BeginTransaction();
            MySql.Data.MySqlClient.MySqlCommand     command     = connection.CreateCommand();

            DateTime lastDynamicTime = DateTime.Now.Subtract(new TimeSpan(0, 4, 0, 0));
            DateTime lastStaticTime  = DateTime.Now.Subtract(new TimeSpan(15, 0, 0, 0));


            string sqlDeleteAisData = "delete from realtimeaisdynamicinfotable where AISTimeStamp < '" + lastDynamicTime + "';";

            sqlDeleteAisData += "delete from realtimeaisstaticinfotable where Timestamp < '" + lastStaticTime + "';";
            try
            {
                command.CommandText = sqlDeleteAisData;
                command.ExecuteNonQuery();

                // 提交数据入库
                transaction.Commit();
                if (controlObject != null)
                {
                    // 提交错误日志
                    controlObject.AddStatusString("AIS过时数据删除操作成功。");
                }

                command.Dispose();
            }
            catch (Exception ex)
            {
                // 放弃当前的数据入库操作
                transaction.Rollback();
                if (controlObject != null)
                {
                    // 提交错误日志
                    controlObject.AddStatusString("AIS过时数据删除操作失败。\r\n错误信息为:" + ex.ToString());
                }
            }
        }
        /// <summary>
        /// 动态数据入库操作
        /// </summary>
        private static void SaveDynamicData(MySql.Data.MySqlClient.MySqlConnection connection, List <string> dynamicSqlCommandCollection, AisControl controlObject)
        {
            // 开始事务处理
            MySql.Data.MySqlClient.MySqlTransaction transaction = connection.BeginTransaction();
            MySql.Data.MySqlClient.MySqlCommand     command     = connection.CreateCommand();
            try
            {
                // 批量更新
                foreach (string cmd in dynamicSqlCommandCollection)
                {
                    command.CommandText = cmd;
                    command.ExecuteNonQuery();
                }

                // 提交数据入库
                transaction.Commit();
                if (controlObject != null)
                {
                    // 提交错误日志
                    controlObject.AddStatusString("动态数据入库操作成功。动态目标数量[" + dynamicSqlCommandCollection.Count.ToString() + "]");
                }
            }
            catch (Exception ex)
            {
                // 放弃当前的数据入库操作
                transaction.Rollback();
                if (controlObject != null)
                {
                    // 提交错误日志
                    controlObject.AddStatusString("动态数据入库操作失败。\r\n错误信息为:" + ex.ToString());
                }
            }
        }