public static OutgoingSiteWidePermissions Parse(SitePermissions x)
        {
            if (x == null)
            {
                return(null);
            }

            return(new OutgoingSiteWidePermissions
            {
                Id = x.Id,
                Name = x.Name,
                Hotel = OutgoingPermissions.Parse(x.HotelPermissions),
                Price = OutgoingPermissions.Parse(x.PricePermissions),
                OtherReservations = OutgoingPermissions.Parse(x.OtherReservationsPermissions),
                Icon = OutgoingPermissions.Parse(x.IconPermissions),
                PersonalReservation = OutgoingPermissions.Parse(x.PersonalReservationsPermissions)
            });
        }
Beispiel #2
0
        public static OutgoingHotelPermissions Parse(HotelPermissions x)
        {
            if (x == null)
            {
                return(null);
            }

            return(new OutgoingHotelPermissions
            {
                Id = x.Id,
                Name = x.Name,
                Hotel = OutgoingPermissions.Parse(x.HotelPermission),
                Users = OutgoingPermissions.Parse(x.UserPermissions),
                OtherReservations = OutgoingPermissions.Parse(x.OtherReservationsPermissions),
                Items = OutgoingPermissions.Parse(x.ItemPermissions),
                PersonalReservations = OutgoingPermissions.Parse(x.PersonalReservationPermissions)
            });
        }