コード例 #1
0
        private void ChangeOrderStore(HttpContext context)
        {
            string orderId = context.Request["orderId"].ToString();
            int    num     = context.Request["storeId"].ToInt(0);
            int    num2    = context.Request["isGetStore"].ToInt(0);
            string text    = "";
            bool   flag    = StoresHelper.ChangeOrderStore(orderId, num, out text);

            if (num > 0 & flag)
            {
                if (num2 == 1)
                {
                    VShopHelper.AppPsuhRecordForStore(num, orderId, "", EnumPushStoreAction.TakeOnStoreOrderWaitConfirm);
                }
                else
                {
                    VShopHelper.AppPsuhRecordForStore(num, orderId, "", EnumPushStoreAction.StoreOrderWaitSendGoods);
                }
            }
            if (num2 != 1)
            {
                ShippersInfo defaultOrFirstShipper = SalesHelper.GetDefaultOrFirstShipper(0);
                StoresInfo   storeById             = StoresHelper.GetStoreById(num);
                OrderInfo    orderInfo             = OrderHelper.GetOrderInfo(orderId);
                Messenger.OrderPaymentToShipper(defaultOrFirstShipper, storeById, null, orderInfo, orderInfo.GetTotal(false));
            }
            context.Response.ContentType = "text/plain";
            context.Response.Write("{\"state\":" + (flag ? "1" : "0") + ",\"message\": \"" + text + "\"}");
        }