private void btConsulta4_Click(object sender, EventArgs e) { Codes tc = new Codes(new BancoVenda().codSegmentoByProduto(Convert.ToInt16(mtCodigo.Text))); tc.ShowDialog(); mtCodigo3.Text = tc.getCodigoProduto(); KeyPressEventArgs x = new KeyPressEventArgs('\r'); mtCodigo3_KeyPress(sender, x); }
private void btConsulta1_Click(object sender, EventArgs e) { Codes tc = new Codes(); tc.ShowDialog(); mtCodigo.Text = tc.getCodigoProduto(); KeyPressEventArgs x = new KeyPressEventArgs('\r'); mtCodigo_KeyPress(sender, x); }