private void btnNew_Click(object sender, EventArgs e) { StudentRegistration Registration = new StudentRegistration(); StudentRegistration.studentID = 0; Registration.ShowDialog(); RefreshGrid(); buttonSave.Focus(); }
private void btnNew_Click(object sender, EventArgs e) { StudentRegistration Registration = new StudentRegistration(); StudentRegistration.studentID = 0; Registration.ShowDialog(); RefreshGrid(); btnSave.Focus(); }
private void dgvDetail_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { int sID = int.Parse(dgvDetail["StudentID", e.RowIndex].Value.ToString()); if (sID > 0) { //fills the values to controls StudentRegistration Registration = new StudentRegistration(); StudentRegistration.studentID = sID; Registration.ShowDialog(); RefreshGrid(); btnSave.Focus(); } } }
private void dgvDetail_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { int sID = int.Parse(dataGridViewStudentDetails["StudentID", e.RowIndex].Value.ToString()); if (sID > 0) { //fills the values to controls StudentRegistration Registration = new StudentRegistration(); StudentRegistration.studentID = sID; Registration.ShowDialog(); RefreshGrid(); buttonSave.Focus(); } } }