Beispiel #1
0
        /// <summary>
        /// 添加商品品牌
        /// </summary>
        /// <param name="brandWallDto">商品品牌实体</param>
        /// <returns></returns>
        public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO AddComInnerBrandExt(Jinher.AMP.BTP.Deploy.CommodityInnerBrandDTO innerBrandDto)
        {
            ResultDTO dto = null;

            try
            {
                ContextSession contextSession = ContextFactory.CurrentThreadContext;
                var            combrand       = CommodityInnerBrand.CreateCommodityInnerBrand();
                combrand.AppId       = innerBrandDto.AppId;
                combrand.BrandId     = innerBrandDto.BrandId;
                combrand.CommodityId = innerBrandDto.CommodityId;
                combrand.Name        = innerBrandDto.Name;
                combrand.AppId       = innerBrandDto.AppId;
                combrand.SubId       = innerBrandDto.SubId;
                combrand.SubTime     = DateTime.Now;
                combrand.ModifiedOn  = innerBrandDto.SubTime;
                combrand.EntityState = System.Data.EntityState.Added;
                contextSession.SaveObject(combrand);
                contextSession.SaveChanges();
                dto = new ResultDTO {
                    ResultCode = 0, Message = "保存成功", isSuccess = true
                };
            }
            catch (Exception ex)
            {
                LogHelper.Error(string.Format("商品品牌信息保存异常。AddComInnerBrandExt:{0}", ex.Message));
                dto = new ResultDTO {
                    ResultCode = 1, Message = ex.Message, isSuccess = false
                };
            }
            return(dto);
        }
Beispiel #2
0
 /// <summary>
 /// 添加商品品牌
 /// </summary>
 /// <param name="brandWallDto">商品品牌实体</param>
 /// <returns></returns>
 public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO AddComInnerBrand(Jinher.AMP.BTP.Deploy.CommodityInnerBrandDTO innerBrandDto)
 {
     base.Do(false);
     return(this.AddComInnerBrandExt(innerBrandDto));
 }