Beispiel #1
0
        public void NextStepForm2Clicked(object sender, RoutedEventArgs e)
        {
            TextBox    fName, lName, pNumber, provider, hFeet, hIn, wLb, wOz, phoneNum;
            DatePicker bDay;

            fName    = (TextBox)FindName("tb_fname");
            lName    = (TextBox)FindName("tb_lname");
            pNumber  = (TextBox)FindName("tb_patient_number");
            provider = (TextBox)FindName("tb_provider");
            bDay     = (DatePicker)FindName("dp_birthday");
            hFeet    = (TextBox)FindName("tb_height_ft");
            hIn      = (TextBox)FindName("tb_height_inches");
            wLb      = (TextBox)FindName("tb_weight_lb");
            wOz      = (TextBox)FindName("tb_weight_oz");
            phoneNum = (TextBox)FindName("tb_phone_number");
            if (patient == null)
            {
                patient       = new PTPatient();
                patient.Fname = fName.Text;
                patient.Lname = lName.Text;
                //patient.Patientnumber = Convert.ToInt32(pNumber.Text);
                patient.Birthdate    = bDay.Date.DateTime;
                patient.HeightFeet   = Convert.ToInt32(hFeet.Text);
                patient.HeightInches = Convert.ToInt32(hIn.Text);
                patient.WeightPounds = Convert.ToInt32(wLb.Text);
                patient.Phone        = phoneNum.Text;
            }
            info[PTPatient.PATIENT] = patient;
            this.Frame.Navigate(typeof(PTForm2), info);
        }
Beispiel #2
0
        public Login()
        {
            this.InitializeComponent();
            PTUser    pt      = new PTUser(101010, "ptuser1", "pass123", new DateTime(), PTUser.PT);
            PTUser    pt2     = new PTUser(11111, "ptuser2", "pass123", new DateTime(), PTUser.PT);
            PTUser    manager = new PTUser(100100, "manager", "pass123", new DateTime(), PTUser.MANAGER);
            PTPatient p1      = new PTPatient("John", "Smith", "Electrician", new DateTime(), 5, 7, 140, 5, "5553724321", "Edison");
            PTPatient p2      = new PTPatient("David", "L", "Mechanic", new DateTime(), 5, 7, 140, 5, "5553724321", "RepairAndFix");
            PTPatient p3      = new PTPatient("Rob", "Silva", "N/A", new DateTime(), 5, 7, 140, 5, "5553724321", "N/A");
            PTPatient p4      = new PTPatient("Danny", "Chavez", "N/A", new DateTime(), 5, 7, 140, 5, "5553724321", "N/A");
            PTPatient p5      = new PTPatient("Victoria", "Medina", "N/A", new DateTime(), 5, 7, 140, 5, "5553724321", "N/A");
            PTPatient p6      = new PTPatient("Milhouse", "N", "N/A", new DateTime(), 5, 7, 140, 5, "5553724321", "N/A");

            p1.ListOfForms.Add(new Form());
            p1.ListOfForms.Add(new Form());
            p1.ListOfForms.ElementAt(1).appointmentDate = new DateTime(2014, 5, 11);
            p2.ListOfForms.Add(new Form());
            p3.ListOfForms.Add(new Form());
            pt.listOfPatients.Add(p1);
            pt.listOfPatients.Add(p4);
            pt2.listOfPatients.Add(p2);
            pt2.listOfPatients.Add(p3);
            pt2.listOfPatients.Add(p5);
            pt2.listOfPatients.Add(p6);
            manager.listOfPatients.Add(p1);
            manager.listOfPatients.Add(p2);
            manager.listOfPatients.Add(p3);
            manager.listOfPatients.Add(p4);
            manager.listOfPatients.Add(p5);
            manager.listOfPatients.Add(p6);

            users.Add(pt.UserName, pt);
            users.Add(pt2.UserName, pt2);
            users.Add(manager.UserName, manager);
        }
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.
        /// This parameter is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            info = e.Parameter as object[];

            PTPatient     patient = (PTPatient)info[PTPatient.PATIENT];
            List <string> list    = new List <String>();

            if (patient.ListOfForms.Count != 0)
            {
                ListView clientList = (ListView)FindName("lv_client_list");

                ListViewItem items = (ListViewItem)FindName("lvi_item");


                foreach (Form f in patient.ListOfForms)
                {
                    list.Add(f.appointmentDate.ToString());
                }
                clientList.ItemsSource       = list;
                clientList.SelectionChanged += ListView_SelectionChanged;
            }
        }
Beispiel #4
0
        public void NextStepClicked(object sender, RoutedEventArgs e)
        {
            CheckBox employed = (CheckBox)FindName("cb_employed_yes");

            patient = (PTPatient)info[PTPatient.PATIENT];
            if (employed.IsChecked == true)
            {
                TextBox employer   = (TextBox)FindName("tb_employer");
                TextBox occupation = (TextBox)FindName("tb_occupation");

                patient.Employer   = employer.Text;
                patient.Occupation = occupation.Text;
            }
            else
            {
                patient.Employer   = "N/A";
                patient.Occupation = "N/A";
            }

            info[PTPatient.PATIENT] = patient;
            this.Frame.Navigate(typeof(PTForm3), info);
        }
Beispiel #5
0
 /// <summary>
 /// Invoked when this page is about to be displayed in a Frame.
 /// </summary>
 /// <param name="e">Event data that describes how this page was reached.
 /// This parameter is typically used to configure the page.</param>
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     patient = e.Parameter as PTPatient;
 }