/// <summary> /// 更新产品类型 /// </summary> /// <param name="wType"></param> public void WareTypeUpdate(ProductType wType) { OtDB db = GetDb(); try { db.Begin(); db.ExecUpdate(wType, "ProductType", new string[] { "Name", "Description", "BEnable" }, string.Format(" TID = '{0}'", wType.TID), null); db.Commit(); } catch (Exception ex) { OtCom.XLogErr(ex.Message); db.Rollback(); } }
/// <summary> /// 更新商品信息 /// </summary> /// <param name="_myProduct"></param> public void WareUpdate(ProductInfo _myProduct) { OtDB db = GetDb(); try { db.Begin(); db.ExecUpdate(_myProduct, "ProductInfo", new string[] { "ProductID", "ProductName", "ProductPrice", "ProductIsSaled", "ProductTag", "ProductBrand", "ProductAttach", "ProductType", "ProductImagePath" }, string.Format(" ProductID = '{0}'", _myProduct.ProductID), null); db.Commit(); } catch (Exception ex) { OtCom.XLogErr(ex.Message); db.Rollback(); } }
/// <summary> /// 更新商品信息 /// </summary> /// <param name="_myProduct"></param> public void WareUpdate(ProductInfo _myProduct) { OtDB db = GetDb(); try { db.Begin(); db.ExecUpdate(_myProduct, "ProductInfo", new string[] { "ProductName", "BrandID", "ProductBrand", "ProductAttach", "ProductIsSaled", "ProductTag", "Catalog", "ProductImageWebPath", "ProductImagePath", "ProductURL", "ProductCoupon", "ProductPromoMsg", "ProductDispatchMode", "ProductPrice", "ProductType", "ProductMobilePrice", "ProductQQPrice", "ProductWXPrice", //"ProductPriceTrend", "ProductBasePrice", "ProductGeneralRate", "ProductPoorRate", "ProductHotCommentTag", "ProductEvaluateCount", "ProductGoodRate", "Focus" }, string.Format(" ProductID = '{0}'", _myProduct.ProductID), null); db.Commit(); } catch (Exception ex) { OtCom.XLogErr(ex.Message); db.Rollback(); } }