private void button3_Click(object sender, EventArgs e) { int selectedRowCount = dataGridView1.Rows.GetRowCount(DataGridViewElementStates.Selected); if (selectedRowCount > 0) { for (int i = 0; i < selectedRowCount; i++) { int id = (int)dataGridView1.SelectedRows[i].Cells["idUsuario"].Value; foreach (Usuario usr in users) { if (usr.idUsuario == id) { AltaHuella alta = new AltaHuella(usr); alta.MdiParent = this.MdiParent; alta.WindowState = FormWindowState.Maximized; alta.Show(); } } } } else { MessageBox.Show("Seleccione un usuario"); } }
private void button2_Click(object sender, EventArgs e) { AltaHuella alta = new AltaHuella(usuario.idUsuario.ToString()); alta.MdiParent = this.MdiParent; alta.WindowState = FormWindowState.Maximized; alta.Show(); }