private void btnLogin_Click(object sender, EventArgs e) { if (TaiKhoanData.CheckLogin(txtUsername.Text.Trim().ToString(), txtPassword.Text)) { lblInvalid.Visible = false; this.Visible = false; frmMaintainSpeciality form = new frmMaintainSpeciality(); form.LoginedUser = txtUsername.Text.Trim().ToString(); form.Visible = true; } else { lblInvalid.Visible = true; } }