private void VerListaClientesButton_Click(object sender, RoutedEventArgs e) { ConsultaClientes consultaClientes = new ConsultaClientes(selecionar: true); consultaClientes.Owner = this; consultaClientes.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { ConsultaClientes obj = new ConsultaClientes(); if (obj.ShowDialog() == DialogResult.OK) { int pos = Convert.ToInt16(obj.dataCliente.CurrentCell.RowIndex); txtcodcli.Text = string.Empty; txtcodcli.Text = obj.dataCliente.Rows[pos].Cells[0].Value.ToString(); txtcodcli.Focus(); SendKeys.Send("{TAB}"); } }