//------------------------------------
        //Return to admin window

        private void Closebtn_Click(object sender, RoutedEventArgs e)
        {
            AdminWindow adminWindow = new AdminWindow();

            adminWindow.Show();
            Close();
        }
Exemplo n.º 2
0
        private void loginbtnClick(object sender, RoutedEventArgs e)
        {
            //-- Verification code that email and password match info in database
            String email    = nametxtbox.Text;
            String password = passwordtxtbox.Text;

            errorTxtbox.Content = "";
            //Directive for where to send the user based on Admin privileges
            switch (clsDB.PasswordCheck(email, password))
            {
            case 0:
                errorTxtbox.Content = "Email or Password is Incorrect";
                break;

            case 1:
                AdminWindow newAdminWindow = new AdminWindow();
                newAdminWindow.Show();
                this.Close();
                break;

            case 2:
                MainWindow newMainWindow = new MainWindow(email);
                newMainWindow.Show();
                this.Close();
                break;
            }
        }
Exemplo n.º 3
0
        private void Cancelbtn_Click(object sender, RoutedEventArgs e)
        {
            AdminWindow adminWindow = new AdminWindow();

            adminWindow.Show();
            this.Close();
            //returns to admin window
        }
        private void Closebtn_Click(object sender, RoutedEventArgs e)
        {
            //------------------------------
            //closes the window and opens admin window
            AdminWindow adminWindow = new AdminWindow();

            adminWindow.Show();
            Close();
        }