private void buttonLogin_Click(object sender, EventArgs e) { LoginDataAccess db = new LoginDataAccess(); db.GetLogin(textBoxUserName.Text.Trim(), textBoxUserPassword.Text.Trim()); if (LoginDataAccess.loginOutput == true) { db.SaveCurrentUser(); MainForm objMenuGlowne = new MainForm(); this.Hide(); objMenuGlowne.Show(); } else { MessageBox.Show("Check username or password"); } }