private void dataViewExamination_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dataViewExamination.SelectedRows.Count > 0) { int ecID = Convert.ToInt32(dataViewExamination.SelectedRows[0].Cells[0].Value); ExaminationCertificate updateEC = ExaminationCertificate.GetEC(ecID); FormECDetail formECD = new FormECDetail(updateEC, "edit"); formECD.ShowDialog(); refreshDataViewExamination(); } }
//Add a new examination certificate private void buttonPatientExamination_Click(object sender, EventArgs e) { if (dataViewPatient.SelectedRows.Count > 0) { int patientID = Convert.ToInt32(dataViewPatient.SelectedRows[0].Cells[0].Value); //Current user int staffID = loginStaff.StaffID; FormECDetail formECD = new FormECDetail(staffID, patientID); formECD.LoginStaff = this.loginStaff; formECD.ShowDialog(); } }
private void buttonUpdateResult_Click(object sender, EventArgs e) { if (dataViewExamination.SelectedRows.Count > 0) { int ecID = Convert.ToInt32(dataViewExamination.SelectedRows[0].Cells[0].Value); ExaminationCertificate updateEC = ExaminationCertificate.GetEC(ecID); //Current user int staffID = loginStaff.StaffID; FormECDetail formECD = new FormECDetail(updateEC, "updateResult", staffID); formECD.ShowDialog(); refreshDataViewExamination(); } }