Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();

            patSearch = new PersonLookup(this);

            // Populates The Doctor Type Combo Box
            DocType dType = new DocType();

            cmboDocType.SelectedValuePath = "typeName";
            cmboDocType.DisplayMemberPath = "typeName";
            cmboDocType.ItemsSource       = dType.GetDocTypes().DefaultView;

            // Populates The Doctor Availability List
            DocAvail da = new DocAvail();

            lvDocAvail.ItemsSource = da.GetDays().DefaultView;

            // Populates The Appointment Time Combo Box
            AppointTime at = new AppointTime();

            cmboTimes.SelectedValuePath = "timeOrder";
            cmboTimes.DisplayMemberPath = "appointTimeStart";
            cmboTimes.ItemsSource       = at.GetTimes().DefaultView;

            // Changes The First & Last Date Displayed
            calAppointment.DisplayDateStart = min;
            calAppointment.DisplayDateEnd   = max;
        }
Esempio n. 2
0
        public void PracSearchPt2()
        {
            DataGrab dDG = new DataGrab();

            txtpracfirstName.Text = dDG.findFirstName(docID);
            txtpraclastName.Text  = dDG.findLastName(docID);
            txtpracaddress.Text   = dDG.findAddress(docID);
            txtpracHomePhone.Text = dDG.findHomePhone(docID);
            txtpracMobile.Text    = dDG.findMobilePhone(docID);
            txtpracMRN.Text       = dDG.findMRN(docID);
            cmboDocType.Text      = dDG.findDocType(docID);

            string fullName = txtpracfirstName.Text + " " + txtpraclastName.Text;

            txtAppDocName.Text = fullName;

            if (tabs.SelectedIndex == 2)
            {
                calAppointment.IsEnabled = true;

                DocAvail  da = new DocAvail();
                DataTable dt;
                dt = da.GetAvailability(docID);

                foreach (DataRow dr in dt.Rows)
                {
                    for (DateTime day = min; day <= max; day = day.AddDays(1))
                    {
                        if (day.DayOfWeek.ToString() == dr["nameofDay"].ToString())
                        {
                            calAppointment.BlackoutDates.Add(new CalendarDateRange(day));
                        }
                    }
                }

                txtAppDocName.IsEnabled = false;
            }
        }