예제 #1
0
        /// <summary>
        /// 根据订单编号获取订单详情信息
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        public OrderDetailRD GetOrderDetailByOrderId(long orderId)
        {
            string url = "/member/orderDetail?orderId=" + orderId.ToString();

            OrderDetailRD orderDetailRD = RestSharpHelper <OrderDetailRD> .Get(url);

            return(orderDetailRD);
        }
예제 #2
0
        /// <summary>
        /// 根据订单编号获取订单详情信息
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        public async Task <OrderDetailRD> GetOrderDetailByOrderId(long orderId)
        {
            string url = rootUrl3 + "/member/orderDetail?orderId=" + orderId.ToString();

            string responseBody = await GetStringDataAsync(url);

            OrderDetailRD orderDetailRD = JsonConvert.DeserializeObject <OrderDetailRD>(responseBody);

            return(orderDetailRD);
        }
예제 #3
0
        /// <summary>
        /// 根据订单编号获取订单详情信息
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        public static OrderDetailRD GetOrderDetailByOrderId(long orderId)
        {
            try
            {
                string url = "/member/orderDetail?orderId=" + orderId.ToString();

                OrderDetailRD orderDetailRD = RestSharpHelper <OrderDetailRD> .Get(url);

                return(orderDetailRD);
            }
            catch (ApplicationException ex)
            {
                throw ex;
            }
        }
        /// <summary>
        /// 获取订单详细信息
        /// </summary>
        /// <param name="orderId"></param>
        public void InitOrderDetailPage(long orderId)
        {
            try
            {
                if (!Tools.IsNetConnective())
                {
                    CrossToastPopUp.Current.ShowToastError("无网络连接,请检查网络。", ToastLength.Long);
                    return;
                }

                IndicatorIsRunning = true;
                PayBtnVisible      = false;

                OrderDetailRD orderDetailRD = _restSharpService.GetOrderDetailByOrderId(orderId);

                if (orderDetailRD.success)
                {
                    Order = orderDetailRD.result;

                    switch (Order.paymentType)
                    {
                    case 1: PaymentType = "立即支付"; break;

                    case 2: PaymentType = "延期一个月"; break;

                    case 3: PaymentType = "延期两个月"; break;

                    default:
                        break;
                    }

                    switch (Order.orderStatus)
                    {
                    case "0": OrderStatus = "未付款"; PayBtnVisible = true; break;

                    case "1": OrderStatus = "已付款"; break;

                    case "2": OrderStatus = "未发货"; break;

                    case "3": OrderStatus = "已发货"; break;

                    case "4": OrderStatus = "交易成功"; break;

                    case "5": OrderStatus = "交易关闭"; break;

                    case "6": OrderStatus = "交易失败"; break;

                    default:
                        break;
                    }

                    ItemNum = 0;
                    foreach (var item in Order.goodsList)
                    {
                        ItemNum += item.productNum;
                    }
                }
                else
                {
                    CrossToastPopUp.Current.ShowToastError(orderDetailRD.message, ToastLength.Long);
                }

                IndicatorIsRunning = false;
            }
            catch (Exception)
            {
                throw;
            }
        }