/// <summary>
        /// 添加满足条件送礼物促销规则.
        /// </summary>
        /// <param name="promoteMeetGiveGift">
        /// Promote_Meet_GiveGift的对象.
        /// </param>
        /// <param name="transaction">
        /// 数据事务.
        /// </param>
        public void UpdateByRuleID(Promote_Meet_GiveGift promoteMeetGiveGift, SqlTransaction transaction)
        {
            if (promoteMeetGiveGift == null)
            {
                throw new ArgumentNullException("promoteMeetGiveGift");
            }

            var parameters = new List<SqlParameter>
                                 {
                                     this.SqlServer.CreateSqlParameter(
                                         "MeetRuleID",
                                         SqlDbType.Int,
                                         promoteMeetGiveGift.MeetRuleID,
                                         ParameterDirection.Input),
                                     this.SqlServer.CreateSqlParameter(
                                         "MeetTypeID",
                                         SqlDbType.Int,
                                         promoteMeetGiveGift.MeetTypeID,
                                         ParameterDirection.Input),
                                     this.SqlServer.CreateSqlParameter(
                                         "ScopeTypeID",
                                         SqlDbType.Int,
                                         promoteMeetGiveGift.ScopeTypeID,
                                         ParameterDirection.Input),
                                     this.SqlServer.CreateSqlParameter(
                                         "ProductID",
                                         SqlDbType.Int,
                                         promoteMeetGiveGift.ProductID,
                                         ParameterDirection.Input)
                                 };
            this.SqlServer.ExecuteNonQuery(CommandType.StoredProcedure, "sp_Promote_Meet_GiveGift_Update", parameters, transaction);
        }
        /// <summary>
        /// 添加满足条件送礼物促销规则.
        /// </summary>
        /// <param name="promoteMeetGiveGift">
        /// Promote_Meet_GiveGift的对象.
        /// </param>
        /// <param name="transaction">
        /// 数据事务.
        /// </param>
        /// <returns>
        /// 添加满足条件送礼物促销规则的编号.
        /// </returns>
        public int Insert(Promote_Meet_GiveGift promoteMeetGiveGift, SqlTransaction transaction)
        {
            if (promoteMeetGiveGift == null)
            {
                throw new ArgumentNullException("promoteMeetGiveGift");
            }

            var parameters = new List<SqlParameter>
                                 {
                                     this.SqlServer.CreateSqlParameter(
                                         "MeetRuleID",
                                         SqlDbType.Int,
                                         promoteMeetGiveGift.MeetRuleID,
                                         ParameterDirection.Input),
                                     this.SqlServer.CreateSqlParameter(
                                         "MeetTypeID",
                                         SqlDbType.Int,
                                         promoteMeetGiveGift.MeetTypeID,
                                         ParameterDirection.Input),
                                     this.SqlServer.CreateSqlParameter(
                                         "ScopeTypeID",
                                         SqlDbType.Int,
                                         promoteMeetGiveGift.ScopeTypeID,
                                         ParameterDirection.Input),
                                     this.SqlServer.CreateSqlParameter(
                                         "ProductID",
                                         SqlDbType.Int,
                                         promoteMeetGiveGift.ProductID,
                                         ParameterDirection.Input),
                                     this.SqlServer.CreateSqlParameter(
                                         "ReferenceID",
                                         SqlDbType.Int,
                                         promoteMeetGiveGift.ID,
                                         ParameterDirection.Output)
                                 };
            this.SqlServer.ExecuteNonQuery(CommandType.StoredProcedure, "sp_Promote_Meet_GiveGift_Insert", parameters, transaction);
            return (int)parameters.Find(parameter => parameter.ParameterName == "ReferenceID").Value;
        }