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(); } }
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(); } }
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(); } }
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(); } }