Beispiel #1
0
        public FriendshipBLL(Friendship friendship)
        {
            GuestSenderID = friendship.GuestSenderID;
            GuestRecieverID = friendship.GuestRecieverID;
            Confirmed = friendship.Confirmed;

            GuestSender = new UserBLL(friendship.GuestSender, "friendship");
            GuestReciever = new UserBLL(friendship.GuestReciever, "friendship");
        }
Beispiel #2
0
 public InvitationBLL(Invitation invitation)
 {
     GuestID = invitation.GuestID;
     ReservationID = invitation.ReservationID;
     Accepted = invitation.Accepted;
     Grade = invitation.Grade;
     Reservation = new ReservationBLL(invitation.Reservation);
     User = new UserBLL(invitation.Guest);
 }
Beispiel #3
0
        public UserBLL loginAttempt(string e_mail, string password, out string message)
        {
            UserBLL userBLL = null;

            UserDBReplica userDBReplica = _loginHandlerDAL.loginAttempt(e_mail, password, out message);
            if(userDBReplica != null)
            {
                userBLL = new UserBLL(userDBReplica);
            }

            return userBLL;
        }
        public int ConfirmBookingTable(List<int> tableIndexes, int restaurantID, String date, String time, int duration, int userID, out UserBLL userBLL, out int? reservationID)
        {
            Guest guestDAL = new Guest();

            int retVal = _restaurantHandlerDAL.ConfirmBookingTable(tableIndexes, restaurantID, date, time, duration, userID, out guestDAL, out reservationID);

            if(retVal == 0)
            {
                userBLL = new UserBLL(guestDAL);
            }
            else
            {
                userBLL = null;
            }

            return retVal;
        }
Beispiel #5
0
        public User(UserBLL userBLL)
        {
            UserID = userBLL.UserID;
            E_Mail = userBLL.E_Mail;

            byte[] data = Convert.FromBase64String(userBLL.Password);
            string decodedPassword = Encoding.UTF8.GetString(data);

            Password = decodedPassword;
            ConfirmPassword = userBLL.Password;
            FirstName = userBLL.FirstName;
            LastName = userBLL.LastName;
            Address = userBLL.Address;
            ImgUrl = userBLL.ImgUrl;
            RestaurantID = userBLL.RestaurantID;
            Discriminator = userBLL.Discriminator;
        }