private void GetVisit(int visitID) { //Appointment appt = AppointmentController.GetAppointment(this.apptID); //DateTime apptDate = Convert.ToDateTime(appt.apptDateTime); try { visit = VisitsController.GetVisit(visitID); this.DisplayVisit(); //if (visit == null) //{ // this.visitDoesntExist(); //} //else //{ //if(appt.isCheckedIn == "False" || apptDate.Date > DateTime.Now.Date) //{ // this.DisplayVisit(); // btnSubmit.Enabled = false; // txtSys.Enabled = false; // txtDia.Enabled = false; // txtTemp.Enabled = false; // txtPulse.Enabled = false; // txtSymptoms.Enabled = false; // cboDiagnoses.Enabled = false; //} //else //{ //this.DisplayVisit(); //btnSubmit.Enabled = true; //txtSys.Enabled = true; //txtDia.Enabled = true; //txtTemp.Enabled = true; //txtPulse.Enabled = true; //txtSymptoms.Enabled = true; //cboDiagnoses.Enabled = true; //} //} } catch (Exception ex) { MessageBox.Show(ex.Message, ex.GetType().ToString()); } }