예제 #1
0
        /// <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();
            }
        }
예제 #2
0
파일: DBHelper.cs 프로젝트: tliangA/KillJD
        /// <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();
            }
        }
예제 #3
0
        /// <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();
            }
        }