Exemple #1
0
        private void signInButton_Click(object sender, EventArgs e)
        {
            AdminLogin aAdminLogin = new AdminLogin();

            aAdminLogin.Username = userNameTextBox.Text;
            aAdminLogin.Password = passwordTextBox.Text;

            if (userNameTextBox.Text == "" || passwordTextBox.Text == "")
            {
                MessageBox.Show("Please fill up required the field");
            }
            else
            {
                LoginManager aLoginManager   = new LoginManager();
                bool         loginPermission = aLoginManager.GivePermitToLogin(aAdminLogin);
                if (loginPermission)
                {
                    Hide();
                    AdminUI aAdminUi = new AdminUI();
                    aAdminUi.Show();
                }
                else
                {
                    MessageBox.Show("Invalid username or password");
                }
            }
        }
Exemple #2
0
        private void AdminButton_Click(object sender, EventArgs e)
        {
            AdminUI adminUI = new AdminUI();

            adminUI.Show();
        }