/// <summary> /// 修改满件优惠全网范围活动. /// </summary> /// <param name="promoteMeetAmountRuleFull"> /// Promote_MeetAmount_Rule_Full的对象. /// </param> /// <param name="transaction"> /// 数据事务. /// </param> public void Update(Promote_MeetAmount_Rule_Full promoteMeetAmountRuleFull, SqlTransaction transaction) { if (promoteMeetAmountRuleFull == null) { throw new ArgumentNullException("promoteMeetAmountRuleFull"); } var parameters = new List<SqlParameter> { this.SqlServer.CreateSqlParameter( "ID", SqlDbType.Int, promoteMeetAmountRuleFull.ID, ParameterDirection.Input), this.SqlServer.CreateSqlParameter( "PromoteMeetAmountID", SqlDbType.Int, promoteMeetAmountRuleFull.PromoteMeetAmountID, ParameterDirection.Input), this.SqlServer.CreateSqlParameter( "MeetAmount", SqlDbType.Int, promoteMeetAmountRuleFull.MeetAmount, ParameterDirection.Input), this.SqlServer.CreateSqlParameter( "IsGiveGift", SqlDbType.Bit, promoteMeetAmountRuleFull.IsGiveGift, ParameterDirection.Input), this.SqlServer.CreateSqlParameter( "IsNoPostage", SqlDbType.Bit, promoteMeetAmountRuleFull.IsNoPostage, ParameterDirection.Input), this.SqlServer.CreateSqlParameter( "IsDiscount", SqlDbType.Bit, promoteMeetAmountRuleFull.IsDiscount, ParameterDirection.Input), }; this.SqlServer.ExecuteNonQuery( CommandType.StoredProcedure, "sp_Promote_MeetAmount_Rule_Full_Update", parameters, transaction); }
/// <summary> /// 添加满件优惠满件全网范围活动. /// </summary> /// <param name="promoteMeetAmountRuleFull"> /// Promote_MeetAmount_Rule_Full的对象. /// </param> /// <param name="transaction"> /// 数据事务. /// </param> /// <returns> /// 全网范围活动的编号. /// </returns> public int Insert(Promote_MeetAmount_Rule_Full promoteMeetAmountRuleFull, SqlTransaction transaction) { if (promoteMeetAmountRuleFull == null) { throw new ArgumentNullException("promoteMeetAmountRuleFull"); } var parameters = new List<SqlParameter> { this.SqlServer.CreateSqlParameter( "PromoteMeetAmountID", SqlDbType.Int, promoteMeetAmountRuleFull.PromoteMeetAmountID, ParameterDirection.Input), this.SqlServer.CreateSqlParameter( "MeetAmount", SqlDbType.Int, promoteMeetAmountRuleFull.MeetAmount, ParameterDirection.Input), this.SqlServer.CreateSqlParameter( "IsGiveGift", SqlDbType.Bit, promoteMeetAmountRuleFull.IsGiveGift, ParameterDirection.Input), this.SqlServer.CreateSqlParameter( "IsNoPostage", SqlDbType.Bit, promoteMeetAmountRuleFull.IsNoPostage, ParameterDirection.Input), this.SqlServer.CreateSqlParameter( "IsDiscount", SqlDbType.Bit, promoteMeetAmountRuleFull.IsDiscount, ParameterDirection.Input), this.SqlServer.CreateSqlParameter( "ReferenceID", SqlDbType.Int, promoteMeetAmountRuleFull.ID, ParameterDirection.Output) }; this.SqlServer.ExecuteNonQuery( CommandType.StoredProcedure, "sp_Promote_MeetAmount_Rule_Full_Insert", parameters, transaction); return (int)parameters.Find(parameter => parameter.ParameterName == "ReferenceID").Value; }