Example #1
0
        private void btnEmployeeAccount_Click(object sender, RoutedEventArgs e)
        {
            AccessWindow window = new AccessWindow(Status.EMPLOYEE);

            window.Show();
            Close();
        }
        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            if (window == PreviousWindow.ACCESS)
            {
                AccessWindow accessWindow = new AccessWindow(status);
                accessWindow.Show();
                Close();
            }
            else if (window == PreviousWindow.LOGIN || window == PreviousWindow.MENU)
            {
                MessageBoxResult result =
                    MessageBox.Show(ConfigurationManager.AppSettings["btnCancelMessage"],
                                    "",
                                    MessageBoxButton.YesNo);

                if (result == MessageBoxResult.Yes && window == PreviousWindow.LOGIN)
                {
                    LoginWindow loginWindow = new LoginWindow();
                    loginWindow.Show();
                    this.Close();
                }
                else if (result == MessageBoxResult.Yes && window == PreviousWindow.MENU)
                {
                    MenuWindow menuWindow = new MenuWindow(null, Status.NO_ACCOUNT);
                    menuWindow.Show();
                    Close();
                }
            }
        }
Example #3
0
        private void btnCustomerAccount_Click(object sender, RoutedEventArgs e)
        {
            AccessWindow window = new AccessWindow(Status.CUSTOMER);

            window.Show();
            Close();
        }