private void mtEditar_Click(object sender, EventArgs e) { if (this.mgFuncionarios.CurrentRow == null) { MessageBox.Show("Primero debes seleccionar una fila!"); } else { //Se abre un formulario para ingresar los datos Form_M_Funcionario_Modificar popUpEditar = new Form_M_Funcionario_Modificar(mainForm, this, funcionariosGridView[mgFuncionarios.CurrentRow.Index].Run); popUpEditar.Show(); this.Visible = false; } }
private void btn_editar_Click(object sender, EventArgs e) { if (this.dgv_funcionarios.CurrentRow == null) { MessageBox.Show("Primero debes seleccionar una fila!"); } else { int id_usuario_actual = int.Parse(this.dgv_funcionarios.CurrentRow.Cells[0].Value.ToString()); Form_M_Funcionario_Modificar popUpEditar = new Form_M_Funcionario_Modificar(this, id_usuario_actual); popUpEditar.Show(); this.Enabled = false; } }