private void txtASNCode_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar != '\r') { return; } if (!asnService.CheckASNReceiveStatus(txtASNCode.Text)) { MessageBox.Show("ASN状态必须是初检!"); return; } BindGrid(false); }
public FReceiveASNMP(string asn, UserControl IQCCommand) { InitializeComponent(); asnService = new BenQGuru.eMES.WinCeClient.ASNReceiveService.ASNReceiveService(); asnService.Url = WebServiceFacade.GetWebServiceURL() + "ASNReceiveService.asmx"; if (string.IsNullOrEmpty(asn)) { throw new Exception(asn + "asn号码为空"); } this.command = IQCCommand; txtASNCode.Text = asn; this.Dock = DockStyle.Fill; this.BackColor = Color.White; BindResultComBox(); if (!asnService.CheckASNReceiveStatus(txtASNCode.Text)) { MessageBox.Show("ASN状态必须是初检!"); return; } BenQGuru.eMES.WinCeClient.ASNReceiveService.AsnSimple simple = asnService.GetAsnStatus(asn); foreach (string key in giveReasons.Keys) { if (key == simple.GiveReason) { cmbGiveinResult.Text = giveReasons[key]; } } foreach (string key in rejectReasons.Keys) { if (key == simple.RejectReason) { cmbRejectResult.Text = rejectReasons[key]; } } txtRejectCount.Text = simple.RejectCount.ToString(); BindGrid(false); }