/// <summary> /// 创建商品sku项 /// </summary> /// <param name="productSKUItemInfo">商品sku项信息</param> public void CreateProductSKUItem(ProductSKUItemInfo productSKUItemInfo) { DbParameter[] parms = { GenerateInParam("@skugid", SqlDbType.Int, 4, productSKUItemInfo.SKUGid), GenerateInParam("@pid", SqlDbType.Int, 4, productSKUItemInfo.Pid), GenerateInParam("@attrid", SqlDbType.SmallInt, 2, productSKUItemInfo.AttrId), GenerateInParam("@attrvalueid", SqlDbType.Int, 4, productSKUItemInfo.AttrValueId), GenerateInParam("@inputvalue", SqlDbType.NVarChar, 100, productSKUItemInfo.InputValue) }; string commandText = string.Format("INSERT INTO [{0}productskus]([skugid],[pid],[attrid],[attrvalueid],[inputvalue]) VALUES(@skugid,@pid,@attrid,@attrvalueid,@inputvalue)", RDBSHelper.RDBSTablePre); RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText, parms); }
/// <summary> /// 创建商品sku项 /// </summary> /// <param name="productSKUItemInfo">商品sku项信息</param> public static void CreateProductSKUItem(ProductSKUItemInfo productSKUItemInfo) { BrnMall.Data.Products.CreateProductSKUItem(productSKUItemInfo); }
/// <summary> /// 创建商品sku项 /// </summary> /// <param name="productSKUItemInfo">商品sku项信息</param> public static void CreateProductSKUItem(ProductSKUItemInfo productSKUItemInfo) { BrnMall.Core.BMAData.RDBS.CreateProductSKUItem(productSKUItemInfo); if (_productnosql != null) _productnosql.ClearProductSKU(productSKUItemInfo.Pid); }