Beispiel #1
0
 private void btn_editar_Click(object sender, EventArgs e)
 {
     if (this.dgv_Usuarios.CurrentRow == null)
     {
         MessageBox.Show("Primero debes seleccionar una fila!");
     }
     else
     {
         int id_usuario_actual = int.Parse(this.dgv_Usuarios.CurrentRow.Cells[0].Value.ToString());
         Form_M_Usuario_Modificar popUpEditar = new Form_M_Usuario_Modificar(this, id_usuario_actual);
         popUpEditar.Show();
         this.Enabled = false;
     }
 }
 private void btn_editar_Click(object sender, EventArgs e)
 {
     if (this.dgv_Usuarios.CurrentRow == null)
     {
         MessageBox.Show("Primero debes seleccionar una fila!");
     }
     else
     {
         //Se obtiene el id del usuario en la fila seleccionada.
         Form_M_Usuario_Modificar popUpEditar = new Form_M_Usuario_Modificar(this, usuarios[dgv_Usuarios.CurrentRow.Index].Id);
         popUpEditar.Show();
         this.Enabled = false;
     }
 }