//Add a new Prescription private void Prescription_Click(object sender, EventArgs e) { if (dataViewPatient.SelectedRows.Count > 0) { int patientID = Convert.ToInt32(dataViewPatient.SelectedRows[0].Cells[0].Value); //Current user int staffID = 10000000; FormPrescriptionDetail formPD = new FormPrescriptionDetail(staffID, patientID); formPD.ShowDialog(); } }
private void buttonPrescpitionEdit_Click(object sender, EventArgs e) { if (dataViewPrescription.SelectedRows.Count > 0) { int prescriptionID = Convert.ToInt32(dataViewPrescription.SelectedRows[0].Cells[0].Value); FormPrescriptionDetail formPD = new FormPrescriptionDetail(Prescription.GetPrescription(prescriptionID), "edit"); formPD.ShowDialog(); refreshDataViewPrescription(); refreshDataViewPrescriptionDetail(); } }
private void dataViewPrescription_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dataViewPrescription.SelectedRows.Count > 0) { int prescriptionID = Convert.ToInt32(dataViewPrescription.SelectedRows[0].Cells[0].Value); FormPrescriptionDetail formPD = new FormPrescriptionDetail(Prescription.GetPrescription(prescriptionID), "edit"); formPD.ShowDialog(); refreshDataViewPrescription(); refreshDataViewPrescriptionDetail(); } }