/// <summary> /// 添加部分退单商品信息 /// </summary> /// <param name="cdto"></param> /// <returns></returns> public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO AddRefundComdtyInfoExt(Jinher.AMP.BTP.Deploy.CustomDTO.BOrderRefundInfoCDTO cdto) { Deploy.CustomDTO.ResultDTO ret = new Deploy.CustomDTO.ResultDTO() { isSuccess = false, ResultCode = 1, Message = "添加失败!" }; if (cdto == null) { ret.Message = "参数不能为空!"; return(ret); } BE.OrderRefundInfo refundInfo = new OrderRefundInfo(); refundInfo.Id = cdto.id; refundInfo.OrderId = cdto.orderId; refundInfo.ItemId = cdto.itemId; refundInfo.Refund = cdto.refund; refundInfo.isDelivery = cdto.isDelivery; refundInfo.OrderRefundId = cdto.orderRefundId; refundInfo.SubId = cdto.subId; refundInfo.SubTime = cdto.subTime; refundInfo.ModifiedOn = cdto.modifiedOn; refundInfo.EntityState = System.Data.EntityState.Added; try { ContextSession contextSession = ContextFactory.CurrentThreadContext; contextSession.SaveObject(refundInfo); int change = contextSession.SaveChanges(); ret.isSuccess = change > 0; if (ret.isSuccess) { ret.Message = "添加成功!"; } return(ret); } catch (Exception ex) { ret.Message = ex.Message; } return(ret); }
public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO AddRefundComdtyInfo(Jinher.AMP.BTP.Deploy.CustomDTO.BOrderRefundInfoCDTO cdto) { //定义返回值 Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO result; try { //调用代理方法 result = base.Channel.AddRefundComdtyInfo(cdto); } catch { //抛异常 throw; } finally { //关链接 ChannelClose(); } //返回结果 return(result); }
/// <summary> /// 添加部分退单商品信息 /// </summary> /// <param name="cdto"></param> /// <returns></returns> public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO AddRefundComdtyInfo(Jinher.AMP.BTP.Deploy.CustomDTO.BOrderRefundInfoCDTO cdto) { base.Do(); return(this.AddRefundComdtyInfoExt(cdto)); }