public static User[] GetAllFriendRequests(string timestamp) { IList<User> objUsers = null; try { objUsers = new List<User>(); objUsers = new UserFacade().GetAllFriendRequests(new Guid(HttpContext.Current.Session["UserId"].ToString())); } catch { } return objUsers != null ? objUsers.ToArray() : null; }
public static User[] GetAllNonFriends(string timestamp, string SearchString) { IList<User> objUsers = null; try { if (SearchString != "1=1") SearchString = "FirstName like '%" + SearchString + "%' OR LastName like '%" + SearchString + "%'"; objUsers = new UserFacade().GetAllUsersExcludingFriends(new Guid(HttpContext.Current.Session["UserId"].ToString()), 0, 20, SearchString, "FirstName ASC"); } catch { } return objUsers != null ? objUsers.ToArray() : null; }