private void txtDes_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)13) { if (txtDes.Text.Trim() != "") { var caja = InfoDryersBusiness.GetSheller(txtDes.Text.ToUpper()); if (caja == null) { MessageBox.Show("Sheller no existe", "Módulo Packing", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); txtDes.Text = ""; txtDes.Focus(); dataEuid.DataSource = null; dataEuids.DataSource = null; return; } else { LlenaGrilla(txtDes.Text.ToUpper()); txtEuid.Focus(); } } } }
private void txtEuid_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)13) { var caja = InfoDryersBusiness.GetSheller(txtDes.Text); if (txtEuid.Text.Trim() != "" && txtDes.Text != "" && caja != null) { BuscaInfo(); GrabaInformacion(); } else { MessageBox.Show("Datos Inválidos", "Módulo Desgrane", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1); txtEuid.Focus(); } } }