Example #1
0
        ///-------------------------------------------------------------------------------------------------
        /// \fn private void Change_Click(object sender, RoutedEventArgs e)
        ///
        /// \brief  Updates the UI to prepare for a date change request for the object's appointment
        ///
        /// \author Bailey
        /// \date   2019-04-18
        ///
        /// \param  object sender
        /// \param  RoutedEventArgs e
        ///-------------------------------------------------------------------------------------------------
        private void Change_Click(object sender, RoutedEventArgs e)
        {
            TabScheduling tab = TabScheduling.tabScheduling;

            tab.SetInformation("Choose a new date for the appointment");
            tab.AwaitDateSelection(this, TabScheduling.MODE_CHANGE);
        }
Example #2
0
        ///-------------------------------------------------------------------------------------------------
        /// \fn private void Recall_Book_Click(object sender, RoutedEventArgs e)
        ///
        /// \brief  Handles the click event for the book request for a recall appointment
        ///
        /// \author Bailey
        /// \date   2019-04-18
        ///
        /// \param  object sender
        /// \param  RoutedEventArgs e
        ///-------------------------------------------------------------------------------------------------
        private void Recall_Book_Click(object sender, RoutedEventArgs e)
        {
            TabScheduling tab = TabScheduling.tabScheduling;

            // Cancel booking if already booking
            if (TabScheduling.currentMode == TabScheduling.MODE_RECALL)
            {
                // Remove the highlight around the target date
                TabScheduling.currentMode          = TabScheduling.MODE_NORMAL;
                TabScheduling.awaitingSelectedDate = null;
                tab.highlightOnLoad = false;

                // Clear instructions
                tab.ClearInformation();

                // Refresh Calendar
                tab.LoadCalendar(tab.currentMonth);
            }
            // Determine date to book
            else
            {
                DateTime recallDate = tab.selectedDate;
                recallDate = recallDate.AddDays(7 * appointment.RecallFlag);

                tab.highlightDay    = recallDate;
                tab.highlightOnLoad = true;
                tab.LoadCalendar(recallDate);

                tab.AwaitDateSelection(this, TabScheduling.MODE_RECALL);
            }
        }