/// <summary>
        /// Load up page to view patient profile
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void viewPatient(object sender, RoutedEventArgs e)
        {
            Button        b       = sender as Button;
            PatientHolder account = b.CommandParameter as PatientHolder;

            subparent.loadPatientInfo(account.ID, "profile");
        }
        public void load()
        {
            listView.Items.Clear();
            DataTable qry = parent.query("select patientid,pcode,email,lastname,firstname,sex,(select photoblob from photo where login_user_id=photo.id) as photo from patient");

            foreach (DataRow rw in qry.Rows)
            {
                PatientHolder patient = new PatientHolder();
                patient.ID       = int.Parse(rw["patientid"].ToString());
                patient.email    = rw["email"].ToString();
                patient.pcode    = rw["pcode"].ToString();
                patient.fullname = rw["lastname"].ToString() + " " + rw["firstname"].ToString();
                patient.sex      = rw["sex"].ToString();
                patient.photo    = parent.getImg((byte[])rw["photo"]);
                listView.Items.Add(patient);
            }
            resultLabel.Content = "Result: " + qry.Rows.Count + " found";
        }