Exemple #1
0
        /// <summary>
        /// 编辑商品
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public CommodityUpdateRes UpdateCommodityInfo(CommodityUpdateReq request)
        {
            CommodityUpdateRes response = new CommodityUpdateRes();
            CommodityInfo      info     = new CommodityInfo()
            {
                CommodName       = request.CommodName,
                SystematicId     = request.SystematicId,
                CommodityImg     = request.CommodityImg,
                CommodityPrice   = request.CommodityPrice,
                CommodityDetalis = request.CommodityDetalis,
                RegisterDate     = request.RegisterDate,
                PutNumber        = request.PutNumber,
                CountNumber      = request.CountNumber,
            };
            var res = dal.UpdateCommodityInfo(info);

            if (res > 0)
            {
                response.CommodityUpdate = true;
                response.Message         = "添加成功";
            }
            else
            {
                response.CommodityUpdate = false;
                response.Message         = "注册失败";
            }
            return(response);
        }
        public JsonResult CommodityUpdate(CommodityUpdateReq request)
        {
            var res = bll.UpdateCommodityInfo(request);

            return(Json(res));
        }
Exemple #3
0
 /// <summary>
 /// 编辑商品
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public CommodityUpdateRes UpdateCommodityInfo(CommodityUpdateReq request)
 {
     return(ApiRequestHelper.Post <CommodityUpdateReq, CommodityUpdateRes>(request));
 }
Exemple #4
0
 public CommodityUpdateRes UpdateCommodityInfo(CommodityUpdateReq request)
 {
     return(CommodityBll.Instance.UpdateCommodityInfo(request));
 }