private void textBox1_boxno_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar != 13) { return; } string hu = textBox1_boxno.Text.Trim(); if (string.IsNullOrEmpty(hu)) { return; } //显示箱号信息Z_EW_RF_283 string sapRe = ""; string sapMsg = ""; CPKCheckHuInfo huInfo = SAPDataService.getPKCheckHuInfo(hu, out sapRe, out sapMsg); HuInfoForm iForm = new HuInfoForm(this, huInfo, sapRe); if (DialogResult.OK == iForm.ShowDialog()) { showBoxDetailInfo(); } else { textBox1_boxno.Text = ""; textBox1_boxno.Focus(); } }
public HuInfoForm(InventoryForm p, CPKCheckHuInfo hu, string sapRe) { mParent = p; mHu = hu; mSapRe = sapRe; DialogResult = DialogResult.Cancel; InitializeComponent(); }