//void givePoint_Click(object sender, EventArgs e) //{ // if (dgvStudent.CurrentRow == null) // { // return; // } // ScoreFrm frm = new ScoreFrm(); // frm.Parent = this; // frm.RegisID = Convert.ToString(dgvStudent.CurrentRow.Cells[3].Value); // frm.StdID = (string)dgvStudent.CurrentRow.Cells[0].Value; // frm.StdName = (string)dgvStudent.CurrentRow.Cells[1].Value; // frm.ShowDialog(); //} void scanFinger_Click(object sender, EventArgs e) { if (dgvStudent.CurrentRow == null) { return; } ScanFingerStdFrm frm = new ScanFingerStdFrm(); frm.Parent = this; frm.StdID = (string)dgvStudent.CurrentRow.Cells[1].Value; frm.StdName = (string)dgvStudent.CurrentRow.Cells[2].Value; frm.ShowDialog(); dgvSubject_SelectionChanged(null, null); }
private void btnFinger_Click(object sender, EventArgs e) { foreach (DataGridViewRow item in dgvStudent.Rows) { item.Selected = true; if ((string)item.Cells["Status"].Value == "noscan") { ScanFingerStdFrm frm = new ScanFingerStdFrm(); frm.Parent = this; frm.AutoScanMode = true; frm.StdID = (string)item.Cells["StdID"].Value; frm.StdName = (string)item.Cells["StdName"].Value; frm.ShowDialog(); dgvSubject_SelectionChanged(null, null); if (frm.StopAutoScan == true) { break; } } } }