コード例 #1
0
        private void btnGetGoods_Click(object sender, EventArgs e)
        {
            int        returnId   = this.Page.Request["ReturnId"].ToInt(0);
            ReturnInfo returnInfo = TradeHelper.GetReturnInfo(returnId);
            OrderInfo  orderInfo  = TradeHelper.GetOrderInfo(returnInfo.OrderId);

            if (orderInfo == null)
            {
                this.ShowMsg("订单不存在!", false);
            }
            else if (orderInfo.SupplierId != HiContext.Current.Manager.StoreId)
            {
                this.ShowMsg("订单不是当前供应商订单,请勿非法操作。", false);
            }
            else if (returnInfo == null)
            {
                this.ShowMsg("退货信息错误!", false);
            }
            else if (returnInfo.HandleStatus != ReturnStatus.Deliverying)
            {
                this.ShowMsg("当前状态不允许进行收货!", false);
            }
            else if (TradeHelper.FinishGetGoodsForReturn_Supplier(returnInfo.ReturnId, returnInfo.OrderId, returnInfo.SkuId))
            {
                this.ShowMsg("收货成功,由平台进行退款处理!", true, HttpContext.Current.Request.Url.ToString());
            }
            else
            {
                this.ShowMsg("收货失败!", false);
            }
        }