protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["user"] == null)
            {
                Response.Redirect("~/Logon.aspx");
            }

            int patientID = getPatientID();

            ListBoxAppointments.Items.Clear();

            List <Appointment> appointments = AppointmentManager.GetPatientAppointments(patientID);

            if (appointments.Count < 1)
            {
                ListBoxAppointments.Items.Add("You do not currently have any scheduled appointments.");
                return;
            }

            foreach (Appointment appointment in appointments)
            {
                ListBoxAppointments.Items.Add(appointment.Date + " with " + appointment.Doctor.FirstName + " " + appointment.Doctor.LastName);
            }
        }
 private int getPatientID()
 {
     return(AppointmentManager.GetPatientByUserName(Session["user"].ToString()).PatientID);
 }
Ejemplo n.º 3
0
 private int getDoctorID()
 {
     return(AppointmentManager.GetDoctorByUserName(Session["user"].ToString()).DoctorID);
 }
 private List <Patient> getPatients()
 {
     return(AppointmentManager.GetPatients());
 }
 private Doctor getLoggedInDoctor()
 {
     return(AppointmentManager.GetDoctorByUserName(Session["user"].ToString()));
 }
 private List <Doctor> getDoctors()
 {
     return(AppointmentManager.GetDoctors());
 }
 private Patient getLoggedInPatient()
 {
     return(AppointmentManager.GetPatientByUserName(Session["user"].ToString()));
 }