Example #1
0
        private void OpenPatLookup()
        {
            bool lookupOpen;

            lookupOpen = false;

            // Checks to see if the Patient Lookup window is open
            foreach (Window openWin in Application.Current.Windows)
            {
                if (openWin.GetType().Name == "PersonLookup")
                {
                    lookupOpen = true;
                    break;
                }
            }

            if (lookupOpen)
            {
                // Reloads the datagrid table so that any new patients added or updated information will appear
                patSearch.LoadTable();

                // If the Patient Lookup window is open then it will just show it
                patSearch.Show();
            }
            else
            {
                // Otherwise it will create a new instance of the window
                PersonLookup patSearch = new PersonLookup(this);
                // Then open it
                patSearch.Show();
            }
            // Gets the patients ID from the Patient Lookup table for further use
            this.patID = patSearch.patID;
        }
Example #2
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;
        }