public static bool Login(string userName) { int userId = int.Parse(userName); string sqlStr = string.Format("select * from Users where userID={0}", userId); var result = SqlSeverProvider.ExecuteScalar(sqlStr); if (result != null) { return(true); } else { return(false); } }