/// <summary> /// 根据帐号查询用户 /// </summary> /// <param name="loginid"></param> /// <returns></returns> public static LoginInfo getLoginInfoByLoginID(string loginid) { LoginInfo login = null; string sql = "select * from LoginInfo where loginid='" + loginid + "'"; login = LoginInfoService.getLoginInfoBySql(sql); return(login); }
/// <summary> /// 登录 /// </summary> /// <param name="username"></param> /// <param name="password"></param> /// <returns></returns> public static LoginInfo Login(string username, string password) { string sql = ""; LoginInfo login = null; if (username == "admin" && password == "E05730AB3E38D779FC24AE99C890988F") { sql = "select * from LoginInfo where loginid = 'admin '"; } else { sql = "select * from LoginInfo where loginid = '" + username + "' and loginpwd = '" + password + "'"; } login = LoginInfoService.getLoginInfoBySql(sql); return(login); }