public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO Update(Jinher.AMP.BTP.Deploy.CommodityPriceFloatDTO dto) { //定义返回值 Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO result; try { //调用代理方法 result = base.Channel.Update(dto); } catch { //抛异常 throw; } finally { //关链接 ChannelClose(); } //返回结果 return(result); }
/// <summary> /// 添加自动调价设置 /// </summary> /// <param name="searchDto"></param> /// <returns></returns> public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO AddExt(Jinher.AMP.BTP.Deploy.CommodityPriceFloatDTO dto) { ContextSession contextSession = ContextFactory.CurrentThreadContext; try { var entity = CommodityPriceFloat.CreateCommodityPriceFloat(); entity.EsAppId = dto.EsAppId; entity.AppIds = dto.AppIds; entity.FloatPrice = dto.FloatPrice; contextSession.SaveObject(entity); contextSession.SaveChanges(); } catch (Exception ex) { LogHelper.Error("CommodityPriceFloatBP.AddExt 异常", ex); return(new Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO { isSuccess = false, Message = ex.Message }); } return(new Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO { isSuccess = true }); }