private void dgvCliente_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { string idDgv; string nomeDgv; string enderecoDgv; string numeroDgv; string telefoneDgv; string cpfdDgv; // dgvCliente.CurrentRow.Selected = true; idDgv = this.dgvCliente.CurrentRow.Cells[0].Value.ToString(); nomeDgv = this.dgvCliente.CurrentRow.Cells[1].Value.ToString(); enderecoDgv = this.dgvCliente.CurrentRow.Cells[2].Value.ToString(); numeroDgv = this.dgvCliente.CurrentRow.Cells[3].Value.ToString(); telefoneDgv = this.dgvCliente.CurrentRow.Cells[4].Value.ToString(); cpfdDgv = this.dgvCliente.CurrentRow.Cells[5].Value.ToString(); using (Formularios.frmCadastroCliente abn = new Formularios.frmCadastroCliente()) { abn.RecebendoValorDgv(idDgv, nomeDgv, enderecoDgv, numeroDgv, telefoneDgv, cpfdDgv); abn.ShowDialog(); } }
private void btnAdicionarFornecedor_Click(object sender, EventArgs e) { using (Formularios.frmCadastroCliente abn = new Formularios.frmCadastroCliente()) { abn.ShowDialog(); } }