Ejemplo n.º 1
0
        protected void LoginButton_Click(object sender, EventArgs e)
        {
            int c = UserValidator.getUserByUsername(UserName.Text, Password.Text);

            if (c != 0)
            {
                UserLoginLogger.logSuccess(UserName.Text);
                FormsAuthentication.RedirectFromLoginPage(UserName.Text, true);
            }
            else
            {
                UserLoginLogger.logFailed(UserName.Text);
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //validate(userNameTextBox.Text, passwordTextBox.Text);
            int c = UserValidator.getUserByUsername(userNameTextBox.Text, passwordTextBox.Text);

            if (c != 0)
            {
                new SystemWindow().Show();

                UserLoginLogger.logSuccess(userNameTextBox.Text);
            }
            else
            {
                MessageBox.Show("Incorrect Username / Password");

                UserLoginLogger.logFailed(userNameTextBox.Text);
            }
        }
Ejemplo n.º 3
0
        private void login_Click(object sender, EventArgs e)
        {
            xdoc = XDocument.Load(@"../../Users.xml");
            //validate(userNameTextBox.Text, passwordTextBox.Text);
            int c = UserValidator.getUserByUsername(userNameTextBox.Text, passwordTextBox.Text, xdoc);

            if (c != 0)
            {
                new adminSystemMain().Show();

                UserLoginLogger.logSuccess(userNameTextBox.Text);
            }
            else
            {
                MessageBox.Show("Incorrect Username / Password");

                UserLoginLogger.logFailed(userNameTextBox.Text);
            }
        }