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