private void btn_submit_Click(object sender, EventArgs e) { EncryptPassword encrypt = new EncryptPassword(); SessionManagement.Username = txt_username.Text.Trim(); SessionManagement.Password = txt_password.Text.Trim(); LoginDAL loginDAL = new LoginDAL(); if (loginDAL.AuthenticateUser()) { MessageBox.Show("Successfully logged in", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); frmMainMenu mainMenu = new frmMainMenu(); mainMenu.Show(); Hide(); } else { MessageBox.Show("Fail to login. Please try again", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } txt_username.Clear(); txt_password.Clear(); }