Esempio n. 1
0
        bool ValidateUser()
        {
            var db   = new Models.VasthuDBEntities();
            var user = db.Users.SingleOrDefault(u => u.UserName.Equals(txtUserName.Text.Trim()) && u.Password.Equals(txtPassword.Text.Trim()));

            if (user == null)
            {
                lblError.Text = "Invalid username or password!";
                return(false);
            }
            else
            {
                return(true);
            }
        }