private void GetInfo()
        {
            try
            {
                EmOutboundPara para = new EmOutboundPara()
                {
                    ShopID          = ValidateUtil.CheckEmptyValue(skinComboBoxShopID.SelectedValue),
                    EmRetailOrderID = Order.ID,
                    ExpressCompany  = skinRadioButtonOnline.Checked ? ValidateUtil.CheckEmptyValue(skinTextBoxLogisticCompany.SelectedValue) : null,
                    ExpressOrderID  = skinRadioButtonOnline.Checked ? skinTextBoxLogisticId.Text:null,
                };
                if (skinRadioButtonOnline.Checked)
                {
                    bool rightExpress = KuaiDi100Helper.CheckKuaiDi(GlobalUtil.GetExpressCode(this, para.ExpressCompany), para.ExpressOrderID);

                    if (!rightExpress)
                    {
                        ShowMessage("单号不存在或者已过期!");
                        return;
                    }
                }

                InteractResult result = GlobalCache.EMallServerProxy.EmOutbound(para);
                switch (result.ExeResult)
                {
                case ExeResult.Success:
                    ShowMessage("发货成功!");
                    if (skinRadioButtonOnline.Checked)
                    {
                        EmExpressCompany company = skinTextBoxLogisticCompany.SelectedItem as EmExpressCompany;
                        config.EmExpressCompany = company;
                        config.Save(CONFIG_PATH);
                    }
                    CloseFormAndRefresh(para);
                    SetDialogResult(DialogResult.OK);
                    break;

                case ExeResult.Error:
                    ShowMessage(result.Msg);
                    break;

                default:
                    break;
                }
            }
            catch (KuaiDiException ex)
            {
                ShowErrorMessage(ex.Message);
            }
            catch (Exception ex)
            {
                ShowError(ex);
            }
            finally
            {
                UnLockPage();
            }
        }
Beispiel #2
0
        private void GetInfo()
        {
            try
            {
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                // this.Order.ExpressCompany = "yuantong";
                // this.Order.ExpressOrderID = "800458383600959695";
                if (!(string.IsNullOrEmpty(this.Order.ExpressCompany4Refund) || string.IsNullOrEmpty(this.Order.ExpressOrderID4Refund)))
                {
                    String           result  = KuaiDi100Helper.WebQueryJson(GlobalUtil.GetExpressCode(this, this.Order.ExpressCompany4Refund), this.Order.ExpressOrderID4Refund);
                    JavaScriptObject jObject = (JavaScriptObject)JavaScriptConvert.DeserializeObject(result);
                    String           state   = jObject["state"].ToString();

                    //查询失败
                    String msg    = jObject["message"].ToString();
                    String status = jObject["status"].ToString();
                    if (status != "200")
                    {
                        richTextBox1.Text = status + " " + msg + "\r\n";
                    }
                    //  skinLabelResult.Text = status + " " + msg + "\r\n";
                    //   richTextBox1.Text = status + " " + msg + "\r\n";
                    JavaScriptArray data = (JavaScriptArray)jObject["data"];
                    foreach (JavaScriptObject item in data)
                    {
                        // skinLabelResult.Text += item["ftime"] + " " + item["context"] + "\r\n";
                        richTextBox1.Text += item["ftime"] + " " + item["context"] + "\r\n";
                    }
                }
                else
                {
                    //    skinLabelResult.Text = "没有物理信息";
                    richTextBox1.Text = "没有物流信息";
                }
            }
            catch (Exception ex)
            {
                ShowError(ex);
            }
            finally
            {
                UnLockPage();
            }
        }
        private void GetInfo()
        {
            try
            {
                String expressCompany = ValidateUtil.CheckEmptyValue(skinTextBoxLogisticCompany.SelectedValue);
                String expressOrderID = skinTextBoxLogisticId.Text;
                bool   rightExpress   = KuaiDi100Helper.CheckKuaiDi(GlobalUtil.GetExpressCode(this, expressCompany), expressOrderID);

                if (!rightExpress)
                {
                    ShowMessage("单号不存在或者已过期!");
                    return;
                }

                TabPage page = tabControl1.SelectedTab;
                KeyValuePair <PfOrder, List <PfCustomerDetail> > details = (KeyValuePair <PfOrder, List <PfCustomerDetail> >)page.Tag;
                InteractResult result = GlobalCache.EMallServerProxy.SetPfOrderExpressInfo(details.Key.ID, expressCompany, expressOrderID);

                switch (result.ExeResult)
                {
                case ExeResult.Success:
                    ShowMessage("保存成功!");
                    break;

                case ExeResult.Error:
                    ShowMessage(result.Msg);
                    break;

                default:
                    break;
                }
            }
            catch (KuaiDiException ex)
            {
                ShowErrorMessage(ex.Message);
            }
            catch (Exception ex)
            {
                ShowError(ex);
            }
            finally
            {
                UnLockPage();
            }
        }
Beispiel #4
0
        private void GetInfo()
        {
            try
            {
                if (!String.IsNullOrEmpty(para.ExpressCompany))
                {
                    bool rightExpress = KuaiDi100Helper.CheckKuaiDi(GlobalUtil.GetExpressCode(this, para.ExpressCompany), para.ExpressOrderID);

                    if (!rightExpress)
                    {
                        ShowMessage("单号不存在或者已过期!");
                        return;
                    }
                }

                InteractResult result = GlobalCache.EMallServerProxy.EmOutbound(para);
                switch (result.ExeResult)
                {
                case ExeResult.Success:
                    ShowMessage("发货成功!");
                    RefreshPage();
                    break;

                case ExeResult.Error:
                    ShowMessage(result.Msg);
                    break;

                default:
                    break;
                }
            }
            catch (KuaiDiException ex)
            {
                ShowErrorMessage(ex.Message);
            }
            catch (Exception ex)
            {
                ShowError(ex);
            }
            finally
            {
                UnLockPage();
            }
        }
Beispiel #5
0
        private void GetInfo()
        {
            try
            {
                if (!String.IsNullOrEmpty(para.ExpressCompany))
                {
                    bool rightExpress = KuaiDi100Helper.CheckKuaiDi(GlobalUtil.GetExpressCode(this, para.ExpressCompany), para.ExpressOrderID);

                    if (!rightExpress)
                    {
                        ShowMessage("单号不存在或者已过期!");
                        return;
                    }
                }
                //  string pfCustomerOrderID, string adminUserID, List< PfCustomerDetail > details
                InteractResult result = GlobalCache.EMallServerProxy.PfCustomerOrderDelivery(para.EmRetailOrderID, para.ShopID, null);
                switch (result.ExeResult)
                {
                case ExeResult.Success:
                    ShowMessage("发货成功!");
                    RefreshPage();
                    break;

                case ExeResult.Error:
                    ShowMessage(result.Msg);
                    break;

                default:
                    break;
                }
            }
            catch (KuaiDiException ex)
            {
                ShowErrorMessage(ex.Message);
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                UnLockPage();
            }
        }