private void buttonMonitorEdit_Click(object sender, EventArgs e) { if (dataViewHeathNote.SelectedRows.Count > 0) { int heathNoteID = Convert.ToInt32(dataViewHeathNote.SelectedRows[0].Cells[0].Value); FormHNDetail formHNDetail = new FormHNDetail(HeathMonitoringNote.GetHN(heathNoteID), "edit"); formHNDetail.ShowDialog(); refreshDataViewHeathNote(); } }
private void dataViewHeathNote_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dataViewHeathNote.SelectedRows.Count > 0) { int heathNoteID = Convert.ToInt32(dataViewHeathNote.SelectedRows[0].Cells[0].Value); FormHNDetail formHNDetail = new FormHNDetail(HeathMonitoringNote.GetHN(heathNoteID), "edit"); formHNDetail.ShowDialog(); refreshDataViewHeathNote(); } }
//Add a new heath note private void buttonHealthMonitor_Click(object sender, EventArgs e) { if (dataViewPatient.SelectedRows.Count > 0) { int patientID = Convert.ToInt32(dataViewPatient.SelectedRows[0].Cells[0].Value); int state = Patient.GetPatient(patientID).State; //Current user int staffID = loginStaff.StaffID; if (state == 1) { FormHNDetail formHND = new FormHNDetail(staffID, patientID); formHND.ShowDialog(); } else { MessageBox.Show("Bệnh nhân chưa nhập viện", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }