Ejemplo n.º 1
0
        public void LoadCurrentTherapist(int therapistid)
        {
            ReadTherapist TherapistReader = new ReadTherapist();

            therapistCollection = TherapistReader.GetOneTherapist(therapistid);
            Therapist currentTherapist = new Therapist();

            currentTherapist = therapistCollection.Where(x => x.therapistId == therapistid).FirstOrDefault();
            if (currentTherapist != null)
            {
                txtbName.Text     = currentTherapist.therapistName;
                txtbLastName.Text = currentTherapist.therapistLastName;
                txtbAdress.Text   = currentTherapist.therapistAdress;
                txtbFunction.Text = currentTherapist.therapistFunction;
                txtbTel.Text      = currentTherapist.therapistTel;
                txtbMail.Text     = currentTherapist.therapistMail;
                txtbMoreInfo.Text = currentTherapist.therapistMoreInfo;
                currentTherapist.patientsList.Add(currentUser.ToString());
                BitmapImage src = new BitmapImage();
                src.BeginInit();
                src.UriSource   = new Uri(currentTherapist.therapistPic);
                src.CacheOption = BitmapCacheOption.None;
                src.EndInit();
                imgPhoto.Source = src;
            }
        }
Ejemplo n.º 2
0
        private void btnli_Click(object sender, RoutedEventArgs e)
        {
            Choose.Visibility        = Visibility.Collapsed;
            StepTherapist.Visibility = Visibility.Visible;
            ReadTherapist readthera = new ReadTherapist();

            therapistCollection       = readthera.GetAllTherapists(currentUser);
            therapistlist.ItemsSource = therapistCollection;
            btnnexttherapist_Click(sender, e);
        }