//搜索注册用户22 Ok public List<RegistedUser> SearchRegisterUser(String Keyword) { List<RegistedUser> RegistedUserList = new List<RegistedUser>(); //数据访存器 DatabaseAccess.DataClasses1DataContext DBAccessor = new DataClasses1DataContext(); try { ISingleResult<searchRegistedUserResult> resultList = DBAccessor.searchRegistedUser(Keyword); if (resultList != null) { foreach (searchRegistedUserResult result in resultList) { RegistedUser User = new RegistedUser(); User.UserName = result.id; User.NickName = result.nickname; User.Email = result.email; User.Phone = result.phone; User.School = result.school; User.City = result.city; User.Address = result.address; User.Portrait = result.portraitPath; User.ZoneStyle = new UserZoneStyle(); User.ZoneStyle.ID = result.zonestyleid; String StyleFileUrl = ""; DBAccessor.getStylePathByUser(User.UserName, ref StyleFileUrl); User.ZoneStyle.FileUrl = StyleFileUrl; RegistedUserList.Add(User); } } } catch (Exception e) { } return RegistedUserList; }