/// <summary>
        /// 将活动指向消费者角色
        /// </summary>
        /// <param name="hotelPromotionId"></param>
        /// <param name="CustomerRoleID"></param>
        public void AssignCustomerRole(Guid hotelPromotionId, Guid CustomerRoleID)
        {
            HotelPromotion hotelPromotion = hotelPromotionRepository.GetByKey(hotelPromotionId);
            CustomerRole   customerRole   = customerRoleRepository.GetByKey(CustomerRoleID);

            hotelPromotion.CustomerRoles.Add(customerRole);
            hotelPromotionRepository.Update(hotelPromotion);
            repositoryContext.Commit();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 将活动指向房间分类
        /// </summary>
        /// <param name="hotelPromotionId"></param>
        /// <param name="HotelRoomCategoryID"></param>
        public void AssignHotelRoomCategory(Guid hotelPromotionId, Guid HotelRoomCategoryID)
        {
            HotelPromotion    hotelPromotion    = hotelPromotionRepository.GetByKey(hotelPromotionId);
            HotelRoomCategory hotelRoomCategory = hotelRoomCategoryRepository.GetByKey(HotelRoomCategoryID);

            hotelPromotion.HotelRoomCategorys.Add(hotelRoomCategory);
            hotelPromotionRepository.Update(hotelPromotion);
            repositoryContext.Commit();
        }