Ejemplo n.º 1
0
 void clickAppointment()
 {
     if (ActualPage?.GetType() != typeof(AppointmentPage))
     {
         ActualPage = new AppointmentPage();
     }
 }
        public void BeforeEachTest()
        {
            app = AppInitializer.StartApp(platform);

            loginPage       = new LoginPage();
            dashboardPage   = new DashboardPage();
            appointmentPage = new AppointmentPage();

            loginPage.Login();
        }
Ejemplo n.º 3
0
        //  Public Functions    ///////////////////////////////////////////////////////////////////

        /// <summary>
        /// Removes all backpage history from the program instance.
        /// </summary>
        private void RemoveBackHistory()
        {
            //Reset all pages
            StudentIDPage.Reset();
            AppointmentPage.Reset();
            ProblemPage.Reset();
            AppointmentProblemPage.Reset();
            SummaryPage.Reset();

            //Remove Windows back history
            JournalEntry entry = ContentFrame.NavigationService.RemoveBackEntry();

            while (entry != null)
            {
                entry = ContentFrame.NavigationService.RemoveBackEntry();
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Creates all pages required for submitting a walk-in ticket.
        /// </summary>
        private void CreatePages()
        {
            m_StudentId_Page = new StudentIDPage();
            m_StudentId_Page.PageFinished += PageFinished;

            m_Appointment_Page = new AppointmentPage();
            m_Appointment_Page.PageFinished += PageFinished;

            m_AppointmentProblem_Page = new AppointmentProblemPage();
            m_AppointmentProblem_Page.PageFinished += PageFinished;

            m_WiProblemPage = new ProblemPage();
            m_WiProblemPage.PageFinished += PageFinished;

            m_WiSummaryPage = new SummaryPage();
            m_WiSummaryPage.PageFinished += PageFinished;
        }
Ejemplo n.º 5
0
        private void CreatePages()
        {
            _student_id_page = new StudentIDPage();
            _student_id_page.PageFinished += _page_PageFinished;

            _appt_page = new AppointmentPage();
            _appt_page.PageFinished += _page_PageFinished;

            _appt_prob_page = new AppointmentProblemPage();
            _appt_prob_page.PageFinished += _page_PageFinished;

            _problem_page = new ProblemPage();
            _problem_page.PageFinished += _page_PageFinished;

            _summary_page = new SummaryPage();
            _summary_page.PageFinished += _summary_page_PageFinished;
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Event handler for when each customer logger page is finished.
        /// </summary>
        /// <param name="sender">Not used.</param>
        /// <param name="e">Not used.</param>
        private void PageFinished(object sender, EventArgs e)
        {
            if (ContentFrame.Content == StudentIDPage) //At the student ID page
            {
                if (StudentIDPage.IsAdmin)             //If the user is accessing the admin page
                {
                    AdminWindow_Login();               //Launch the admin window login process
                    RemoveBackHistory();               //Remove all back history
                }
                else
                {
                    //Create new ticket for new customer
                    Cougtech_CustomerLogger.CreateCustomerTicket(StudentIDPage.Nid);

                    if (StudentIDPage.IsQuickPick)         //Else if the issue is a quick-pick
                    {
                        //Populate the summary page and navigate to it
                        SummaryPage.SetText(false, Cougtech_CustomerLogger.CustomerTicket.CustomerName, Cougtech_CustomerLogger.CustomerTicket.Nid,
                                            Cougtech_CustomerLogger.CustomerTicket.Problem, Cougtech_CustomerLogger.CustomerTicket.Description);
                        ContentFrame.Navigate(SummaryPage);
                        SummaryPage.StartTimer();           //Start summary page timer
                    }
                    else                                    //Else
                    {
                        AppointmentPage.Set_text(Cougtech_CustomerLogger.CustomerTicket.CustomerName);
                        ContentFrame.Navigate(AppointmentPage);     //Navigate to the the appointment page
                    }
                }
            }
            else if (ContentFrame.Content == AppointmentPage)               //At the appointment page
            {
                if (Cougtech_CustomerLogger.CustomerTicket.IsAppointment)   //If the customer has an appointment
                {
                    ContentFrame.Navigate(AppointmentProblemPage);          //Navigate to the appointment problem page
                }
                else                                                        //Else
                {
                    ContentFrame.Navigate(ProblemPage);                     //Navigate to the standard problem page
                }
            }
            else if (ContentFrame.Content == ProblemPage) //At the problem page
            {
                //Populate the summary page and navigate to it
                SummaryPage.SetText(false, Cougtech_CustomerLogger.CustomerTicket.CustomerName, Cougtech_CustomerLogger.CustomerTicket.Nid,
                                    Cougtech_CustomerLogger.CustomerTicket.Problem, Cougtech_CustomerLogger.CustomerTicket.Description);
                SummaryPage.StartTimer();
                ContentFrame.Navigate(SummaryPage);
            }
            else if (ContentFrame.Content == AppointmentProblemPage) //At the appointment problem page
            {
                //Populate the summary page and navigate to it
                SummaryPage.SetText(true, Cougtech_CustomerLogger.CustomerTicket.CustomerName, Cougtech_CustomerLogger.CustomerTicket.Nid,
                                    Cougtech_CustomerLogger.CustomerTicket.Problem, Cougtech_CustomerLogger.CustomerTicket.Description);
                SummaryPage.StartTimer();
                ContentFrame.Navigate(SummaryPage);
            }
            else if (ContentFrame.Content == SummaryPage)
            {
                //Submit the customer ticket then return to the student ID page
                Cougtech_CustomerLogger.SubmitTicket();
                ContentFrame.Navigate(StudentIDPage);
            }
        }
Ejemplo n.º 7
0
        //public ICommand CreateOrderCommand { get { return new RelayCommand(CreateOrder); } }


        #endregion

        #region Methods
        public async void LoadAppointment()
        {
            //Triger que se ejecuta para actualizar la view model, cada vez que se muestra la ventana
            AppointmentPage.LoadApiResult();
        }