コード例 #1
0
ファイル: FriendshipBLL.cs プロジェクト: nkl58/BookYourTable
        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");
        }
コード例 #2
0
ファイル: InvitationBLL.cs プロジェクト: nkl58/BookYourTable
 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);
 }
コード例 #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;
        }
コード例 #4
0
        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;
        }
コード例 #5
0
ファイル: User.cs プロジェクト: nkl58/BookYourTable
        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;
        }