/** * This button (View this patient details) loads in selected patient details on the page * */ public void loadCurrentPatient( ) { cleanAll( ); if (currentPatient != null) { DatabaseConverter convert = new DatabaseConverter(dbCon, currentPatient); convert.loadList( ); history = convert.HistoryData( ); if (isDoctor == true) { prescriptionList = convert.GetPrescription( ); prescriptions = convert.PrescriptionData( ); testresultsList = convert.getTestResults( ); testresults = convert.TestResults( ); ListBoxWriter(testresults, testResultsListBox); } ListBoxWriter(prescriptions, prescriptiptionsListBox); textBoxWriter(history, historyBox); detailsBox.Text = currentPatient.FirstName + " " + currentPatient.LastName + " " + currentPatient.DOB.ToShortDateString( ) + "\nGender: " + currentPatient.Gender + "\nNext of kin: " + currentPatient.NextOfKin + "\nAddress " + currentPatient.Address; initCurrentPatientOnPrescriptionForm(currentPatient); } else { MessageBox.Show("Select patient"); } }