Exemplo n.º 1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     var logic = new BusinessLogic(ConfigurationManager.ConnectionStrings[Utilities.Constants.DbName].ConnectionString);
     StateManager.Instance.SetUser(logic.ValidateUserLogin(txtUsername.Text, txtPassword.Text));
     if (StateManager.Instance.GetUser() == null)
     {
         MessageBox.Show("Login Failed Either Your Username or Password was incorrect.");
         return;
     }
     Form frm = new AdminPanel();
     frm.Show();
     //this.Close();
 }
Exemplo n.º 2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            var logic = new BusinessLogic(ConfigurationManager.ConnectionStrings[Utilities.Constants.DbName].ConnectionString);

            StateManager.Instance.SetUser(logic.ValidateUserLogin(txtUsername.Text, txtPassword.Text));
            if (StateManager.Instance.GetUser() == null)
            {
                MessageBox.Show("Login Failed Either Your Username or Password was incorrect.");
                return;
            }
            Form frm = new AdminPanel();

            frm.Show();
            //this.Close();
        }