private void txtorderid_KeyPress(object sender, KeyPressEventArgs e) { //MessageBox.Show(e.KeyChar.ToString()); if (e.KeyChar != 13) { return; } this.txtorderid.Text = this.txtorderid.Text.Trim(); if (this.txtorderid.Text == "") { return; } try { Cursor.Current = Cursors.WaitCursor; string conn = @"orderId=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode; string x = HttpHelper.HttpPost("mergeRefundValidate", conn); msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg)); if (msg == null) { throw new Exception("错误信息捕捉失败"); } if (!msg.success) { throw new Exception(msg.msg); } stockin = (Model.MstockIn)JsonConvert.DeserializeObject(x, typeof(Model.MstockIn)); if (stockin == null) { throw new Exception("数据信息捕捉失败"); } this.labcustomer.Text = stockin.data.shipperInfo.shipperCode + " " + stockin.data.shipperInfo.shipperName; Cursor.Current = Cursors.Default; } catch (Exception ex) { Cursor.Current = Cursors.Default; MessageBox.Show(ex.Message); return; } //if(1==2) //{ this.txtorderid.Enabled = false; this.txttraycode.Enabled = true; this.txttraycode.Focus(); //} }
private void txtorderid_KeyPress(object sender, KeyPressEventArgs e) { //MessageBox.Show(e.KeyChar.ToString()); if (e.KeyChar != 13) { return; } this.txtorderid.Text = this.txtorderid.Text.Trim(); if (this.txtorderid.Text == "") { Ot.frmCustomer frm = new Rf_Wms.Ot.frmCustomer(); frm.isRed = isRed; frm.ShowDialog(); if (!string.IsNullOrEmpty(frm.ccode)) { //customer=frm.customer; //this.labcustomer.Text = customer.code + " " + customer.name; this.txtorderid.Text = frm.ccode; } else { return; } btnData.Visible = false; panel1.Visible = true; isNew = true; } else { panel1.Visible = false; isNew = false; } try { Cursor.Current = Cursors.WaitCursor; string conn = @"orderId=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode; if (isRed) { conn += @"&refund=1"; } else { conn += @"&refund=0"; } string x = HttpHelper.HttpPost("stockInValidate", conn); msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg)); if (msg == null) { throw new Exception("错误信息捕捉失败"); } if (!msg.success) { throw new Exception(msg.msg); } stockin = (Model.MstockIn)JsonConvert.DeserializeObject(x, typeof(Model.MstockIn)); if (stockin == null) { throw new Exception("数据信息捕捉失败"); } this.labcustomer.Text = stockin.data.shipperInfo.shipperCode + " " + stockin.data.shipperInfo.shipperName; Cursor.Current = Cursors.Default; } catch (Exception ex) { Cursor.Current = Cursors.Default; MessageBox.Show(ex.Message); return; } //if(1==2) //{ this.txtorderid.Enabled = false; this.txttraycode.Enabled = true; this.txttraycode.Focus(); //} }