//点击查询销售单 private void BaseButton1_Click(object sender, EventArgs e) { try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } String orderID = retailOrderIDTextBox1.SkinTxt.Text; string costumeID = this.CostumeCurrentShopTextBox1.SkinTxt.Text; if (!string.IsNullOrEmpty(orderID)) { retailOrderIDTextBox1.Focus(); SendKeys.SendWait("{Enter}"); } else if (!string.IsNullOrEmpty(costumeID)) { RetailOrderSelectForm orderSelectForm = new RetailOrderSelectForm(costumeID, shopID, false); orderSelectForm.RetailOrderSelected += OrderSelectForm_RetailOrderSelected; orderSelectForm.ShowDialog(); } } catch (Exception ee) { GlobalUtil.ShowError(ee); } finally { GlobalUtil.UnLockPage(this); } }
private void Search() { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } string orderID = this.SkinTxt.Text.Trim(); if (string.IsNullOrEmpty(orderID)) { if (this.OrderSelected != null) { this.OrderSelected(null); } return; } if (String.IsNullOrEmpty(ShopID)) { ShopID = CommonGlobalCache.CurrentShopID; } List <RetailOrder> resultList = CommonGlobalCache.ServerProxy.GetRetailOrder4ID(orderID, ShopID); if (resultList == null || resultList.Count == 0) { if (this.OrderSelected != null) { this.OrderSelected(null); } this.SkinTxt.Text = ""; return; } if (resultList.Count == 1) { this.SkinTxt.Text = resultList[0].ID; if (this.OrderSelected != null) { this.OrderSelected(resultList[0]); } } else { RetailOrderSelectForm orderSelectForm = new RetailOrderSelectForm(orderID, ShopID); orderSelectForm.RetailOrderSelected += OrderSelectForm_RetailOrderSelected; orderSelectForm.ShowDialog(); } } catch (Exception ee) { CommonGlobalUtil.ShowError(ee); } finally { CommonGlobalUtil.UnLockPage(this); } }