//back button click private void btnBack_Click(object sender, EventArgs e) { MainDisplay md = new MainDisplay(); md.Show(); this.Close(); }//end of back
private void btnLogin_Click(object sender, EventArgs e) { MainDisplay tDGV = new MainDisplay(); tDGV.Show(); this.Hide(); }
//constructor public NewAccount(MainDisplay mdPasses) { InitializeComponent(); md = mdPasses; // calling enums from Countys Class cboCounty.DataSource = Enum.GetValues(typeof(Countys.CountysList)); }
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 = ""; } }