示例#1
0
        /*!
         * \brief This handler handles when the user clicks the "Review Orders" button.
         * \details This handler connects to the review orders page. This handler needs to also make sure that the user means to leave the order creation process, in progress.
         * \param sender <b>object</b>
         * \param e <b>RoutedEventArgs</b>
         */
        private void reviewOrdersBTN_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            createOrderBTN.IsEnabled     = true;
            reviewCustomersBTN.IsEnabled = true;
            reviewOrdersBTN.IsEnabled    = false;

            // Go to Review Orders page
            if (localUser.getOrderProgress() == true)
            {
                MessageBoxResult result = MessageBox.Show("You have a order in progress. Are you sure you want to exit?", "T.M.S. Application", MessageBoxButton.YesNo);
                if (result == MessageBoxResult.Yes)
                {
                    buyer_ReviewOrders reviewOrders = new buyer_ReviewOrders(localUser);
                    theFrame.NavigationService.Navigate(reviewOrders);
                    localUser.setOrderProgress(false);
                }
                else
                {
                    return;
                }
            }
            else
            {
                buyer_ReviewOrders reviewOrders = new buyer_ReviewOrders(localUser);
                theFrame.NavigationService.Navigate(reviewOrders);
            }
        }
示例#2
0
        /*!
         * \brief This handler handles when the user clicks the "Review Orders" button.
         * \details This handler connects to the review orders page. This handler needs to also make sure that the user means to leave the order creation process, in progress.
         * \param sender <b>object</b>
         * \param e <b>RoutedEventArgs</b>
         */

        private void ReviewOrdersBTN_Click(object sender, RoutedEventArgs e)
        {
            // Go to Review Orders page
            buyer_ReviewOrders reviewOrders = new buyer_ReviewOrders(localUser);

            this.NavigationService.Navigate(reviewOrders);
        }
        /*!
         * \brief This handler handles when the user clicks the "Review Orders" button.
         * \details This handler connects to the review orders page. This handler needs to also make sure that the user means to leave the order creation process, in progress.
         * \param sender <b>object</b>
         * \param e <b>RoutedEventArgs</b>
         */

        private void ReviewOrdersBTN_Click(object sender, RoutedEventArgs e)
        {
            // Go to Review Orders page
            if (localUser.getOrderProgress() == true)
            {
                MessageBoxResult result = MessageBox.Show("You have a order in progress. Are you sure you want to exit?", "T.M.S. Application", MessageBoxButton.YesNo);
                if (result == MessageBoxResult.Yes)
                {
                    buyer_ReviewOrders reviewOrders = new buyer_ReviewOrders(localUser);
                    this.NavigationService.Navigate(reviewOrders);
                    localUser.setOrderProgress(false);
                }
                else
                {
                    return;
                }
            }
            else
            {
                buyer_ReviewOrders reviewOrders = new buyer_ReviewOrders(localUser);
                this.NavigationService.Navigate(reviewOrders);
            }
        }