Пример #1
0
        //back button click
        private void btnBack_Click(object sender, EventArgs e)
        {
            MainDisplay md = new MainDisplay();

            md.Show();
            this.Close();
        }//end of back
Пример #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            MainDisplay tDGV = new MainDisplay();

            tDGV.Show();
            this.Hide();
        }
Пример #3
0
 //constructor
 public NewAccount(MainDisplay mdPasses)
 {
     InitializeComponent();
     md = mdPasses;
     // calling enums from Countys Class
     cboCounty.DataSource = Enum.GetValues(typeof(Countys.CountysList));
 }
Пример #4
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            // To enter the system:
            bool retVal = false;

            // setting input to variables
            string inputUsername = txtUserName.Text;
            string inputPassword = txtPassword.Text;

            // calling business layer
            BLLLogInManager bllLogin = new BLLLogInManager();

            // returning true if the input username and password are correct
            retVal = bllLogin.CheckLogin(inputUsername, inputPassword);

            if (retVal)
            {
                MessageBox.Show("Login success!");

                MainDisplay tDGV = new MainDisplay();
                tDGV.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Login Failed!");
                txtPassword.Text = "";
                txtUserName.Text = "";
            }
        }