예제 #1
0
        public List <Trip> GetTripsByUser(User.User user)
        {
            List <Trip> tripList = new List <Trip>();

            User.User loggedUser = UserSession.GetInstance().getLoggedUser();
            bool      isFriend   = false;

            if (loggedUser != null)
            {
                foreach (User.User friend in user.GetFriends())
                {
                    if (friend.Equals(loggedUser))
                    {
                        isFriend = true;
                        break;
                    }
                }
                if (isFriend)
                {
                    tripList = TripDAO.FindTripsByUser(user);
                }
                return(tripList);
            }
            else
            {
                throw new UserNotLoggedInException();
            }
        }
예제 #2
0
 protected virtual List <Trip> FindTripsByUser(User.User user)
 {
     return(TripDAO.FindTripsByUser(user));
 }
예제 #3
0
 protected virtual List <Trip> GetTripsBy(User.User user)
 {
     return(_tripDAO.FindTripsByUser(user));
 }
예제 #4
0
 public List <Trip> FindTripsByUser(User.User user)
 {
     return(TripDAO.FindTripsByUser(user));
 }
예제 #5
0
 public virtual List <Trip> FindTrips(User.User user)
 {
     return(TripDAO.FindTripsByUser(user));
 }