protected void Page_Load(object sender, EventArgs e)
 {
     myPatient = UtilitiesClass.getPatient(Session["LoginName"].ToString());
     if (!IsPostBack)
     {
         ShowSelectedDateLabel.Visible = false;
     }
 }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Convert.ToInt32(Session["IsDoctor"]) == 0)
            {
                PatientsTable myPatient = UtilitiesClass.getPatient(Session["LoginName"].ToString());
                DoctorsTable  myDoctor  = UtilitiesClass.getPatientsDoctor(myPatient);

                HyperLink4.Text        = "Medications/Tests";
                HyperLink4.NavigateUrl = "~/MedAndTestsList.aspx";
                Label1.Text            = "Current Session: " + myPatient.FirstName.Trim() + " " + myPatient.LastName.Trim() + " - Your Doctor: " + myDoctor.FirstName + " " + myDoctor.LastName;
            }
            else if (Convert.ToInt32(Session["IsDoctor"]) == 1)
            {
                DoctorsTable myDoctor = UtilitiesClass.getDoctor(Session["LoginName"].ToString());

                HyperLink4.Text        = "Search for Patient";
                HyperLink4.NavigateUrl = "~/PatientSearch.aspx";
                Label1.Text            = "Current Session: " + myDoctor.FirstName + " " + myDoctor.LastName;
            }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Checks if user is patient or doctor, and creates object
            if (Convert.ToInt32(Session["IsDoctor"]) == 0)
            {
                myPatient            = UtilitiesClass.getPatient(Session["LoginName"].ToString());
                Session["PatientID"] = myPatient.PatientID;

                Label1.Text       = myPatient.FirstName + " " + myPatient.LastName;
                myDoctor          = UtilitiesClass.getPatientsDoctor(myPatient);
                GridView2.Visible = false;
            }
            else
            {
                myDoctor            = UtilitiesClass.getDoctor(Session["LoginName"].ToString());
                Session["DoctorID"] = myDoctor.DoctorID;

                Label1.Text       = myDoctor.FirstName + " " + myDoctor.LastName;
                GridView1.Visible = false;
            }
        }