Beispiel #1
0
 public ReservationBLL(Reservation reservation)
 {
     ReservationID = reservation.ReservationID;
     GuestID = reservation.GuestID;
     ReservationDate = reservation.ReservationDate;
     Restaurant = new RestaurantBLL(reservation.Restaurant);
 }
Beispiel #2
0
 public Restaurant(RestaurantBLL restaurantBLL)
 {
     RestaurantID = restaurantBLL.RestaurantID;
     Name = restaurantBLL.Name;
     Description = restaurantBLL.Description;
     Address = restaurantBLL.Address;
     Configured = restaurantBLL.Configured;
     ImgUrl = restaurantBLL.ImgUrl;
     TablesMatrixWidth = restaurantBLL.TablesMatrixWidth;
     TablesMatrixHeight = restaurantBLL.TablesMatrixHeight;
 }
Beispiel #3
0
 public UserBLL(RestaurantManager restaurantManager)
 {
     UserID = restaurantManager.UserID;
     E_Mail = restaurantManager.E_Mail;
     Password = restaurantManager.Password;
     FirstName = restaurantManager.FirstName;
     LastName = restaurantManager.LastName;
     RestaurantID = restaurantManager.RestaurantID;
     Discriminator = typeof(RestaurantManager).Name;
     Restaurant = new RestaurantBLL(restaurantManager.Restaurant);
 }
Beispiel #4
0
        public UserBLL(UserDBReplica user)
        {
            UserID = user.UserID;
            E_Mail = user.E_Mail;
            Password = user.Password;
            FirstName = user.FirstName;
            LastName = user.LastName;
            Address = user.Address;
            ImgUrl = user.ImgUrl;
            RestaurantID = user.RestaurantID;
            Discriminator = user.Discriminator;

            SentFriendshipRequests = new List<FriendshipBLL>();
            RecievedFriendshipRequests = new List<FriendshipBLL>();

            if (user.SentFriendshipRequests != null)
            {
                foreach (Friendship friendship in user.SentFriendshipRequests)
                {
                    SentFriendshipRequests.Add(new FriendshipBLL(friendship));
                }

                foreach (Friendship friendship in user.RecievedFriendshipRequests)
                {
                    RecievedFriendshipRequests.Add(new FriendshipBLL(friendship));
                }
            }

            if(user.Restaurant != null)
            {
                Restaurant = new RestaurantBLL(user.Restaurant);
            }
        }