Ejemplo n.º 1
0
        /// <summary>
        /// Event handler for when a problem radio button has been checked and the problem does not require a description.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RadioButton_Click_NoTextboxFocus(object sender, RoutedEventArgs e)
        {
            //Set the problem to the text of the radio buttton
            if (Cougtech_CustomerLogger.Problem_SelectionChanged(((RadioButton)sender).Content.ToString()))
            {
                //If successfull
                SubmitButton.IsEnabled = true;                     //Enable the "Next" button

                requiredLabel.Visibility      = Visibility.Hidden; //Hide the red asterisk
                DescriptionTextBox.Visibility = Visibility.Hidden; //Hide the textbox
            }
            else
            {
                MessageBox.Show("The ticketing system has not been initialized correctly./nPlease re-enter your student ID", "System Error");
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Event handler for text changing within the textbox.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DescriptionTextBox_TextChanged(object sender, TextChangedEventArgs e)
 {
     //Set the ticket description
     if (Cougtech_CustomerLogger.Description_TextChanged(DescriptionTextBox.Text))
     {
         //If successful
         if ((DescriptionTextBox.Text == m_sDefaultTextBox) || string.IsNullOrWhiteSpace(DescriptionTextBox.Text))   //If the default description is present, or there is no content within the text box
         {
             SubmitButton.IsEnabled = false;                                                                         //Disable the submit button
         }
         else                                                                                                        //Else
         {
             SubmitButton.IsEnabled = true;                                                                          //Enable the submit button
         }
     }
     else
     {
         MessageBox.Show("The ticketing system has not been initialized correctly./nPlease re-enter your student ID", "System Error");
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Event handler for when the textbox text changes.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void StudentNumberTextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            //Call the control layer's handler for this event and read the return code
            string sCode = Cougtech_CustomerLogger.Nid_TextChanged(StudentNumberTextBox.Text);

            //Now set the functionality of the next button depending on the return code
            switch (sCode)
            {
            case "WI":          //Standard walk-in ticket

                //Color the submit button white and display ""Next"
                m_bIsAdmin = m_bIsQuickPick = false;
                Set_SubmitButton_Enabled();
                break;

            case "QP":          //Quick-pick ticket

                //Color the submit button green and display "Quick-Code"
                m_bIsAdmin     = false;
                m_bIsQuickPick = true;
                Set_SubmitButton_QuickPick();
                break;

            case "Admin":       //The user is accessing the admin page

                //Color the submit button crimson and display "Admin"
                m_bIsAdmin     = true;
                m_bIsQuickPick = false;
                Set_SubmitButton_Admin();
                break;

            default:            //No return code was given. The data within the textbox is invalid

                //Color the submit button gray and disable
                m_bIsAdmin = m_bIsQuickPick = false;
                Set_SubmitButton_Disabled();
                break;
            }
        }
Ejemplo n.º 4
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.º 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TicketLogging_En_Check_Checked(object sender, RoutedEventArgs e)
 {
     TicketSubmission_Email_En = Cougtech_CustomerLogger.TicketLogging_Checked();
 }