private void cad_clientes_Click(object sender, EventArgs e) { frm_cad_cli frmCliente = new frm_cad_cli(); frmCliente.MdiParent = this; frmCliente.Show(); }
//--------------------------------------------------------------------------------------------------------- // Método para selecionar um cliente pelo botão selecionar, assim que o grid cliente abrir //--------------------------------------------------------------------------------------------------------- private void SelecionarCliente() { frm_cad_cli frmCliente = new frm_cad_cli(); frmCliente.ShowDialog(); if (frmCliente.DialogResult == DialogResult.OK) { txt_cod_cli.Text = frmCliente.dg_cliente.Rows[frmCliente.dg_cliente.CurrentRow.Index].Cells[0].Value.ToString(); txt_nome_cli.Text = frmCliente.dg_cliente.Rows[frmCliente.dg_cliente.CurrentRow.Index].Cells[1].Value.ToString(); txt_cod_prod.Focus(); } }