Exemple #1
0
        /// <summary>
        /// 将活动从房间分类中移除
        /// </summary>
        /// <param name="hotelPromotionId"></param>
        /// <param name="HotelRoomCategoryID"></param>
        public void UnassignHotelRoomCategory(Guid hotelPromotionId, Guid HotelRoomCategoryID)
        {
            HotelPromotion    hotelPromotion    = hotelPromotionRepository.GetByKey(hotelPromotionId);
            HotelRoomCategory hotelRoomCategory = hotelRoomCategoryRepository.GetByKey(HotelRoomCategoryID);

            hotelPromotion.HotelRoomCategorys.Add(hotelRoomCategory);
            hotelPromotionRepository.Remove(hotelPromotion);
            repositoryContext.Commit();
        }
Exemple #2
0
        /// <summary>
        /// 根据房间名称获取房间分类
        /// </summary>
        /// <param name="RoomName"></param>
        /// <returns></returns>
        public HotelRoomCategoryDataObject GetHotelRoomCategoryByRoomName(string RoomName)
        {
            HotelRoomCategory hotelRoomCategory = hotelRoomCategoryRepository.GetHotelRoomCategoryByRoomName(RoomName);

            return(AutoMapper.Mapper.Map <HotelRoomCategory, HotelRoomCategoryDataObject>(hotelRoomCategory));
        }
Exemple #3
0
        /// <summary>
        /// 根据分类名称获取分类信息
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public HotelRoomCategoryDataObject GetHotelRoomCategoryByName(string name)
        {
            HotelRoomCategory HotelRoomCategory = hotelRoomCategoryRepository.Find(Specification <HotelRoomCategory> .Eval(h => h.Name.Equals(name)));

            return(AutoMapper.Mapper.Map <HotelRoomCategory, HotelRoomCategoryDataObject>(HotelRoomCategory));
        }
Exemple #4
0
        /// <summary>
        /// 根据分类Id值获取分类信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public HotelRoomCategoryDataObject GetHotelRoomCategoryByKey(Guid Id)
        {
            HotelRoomCategory HotelRoomCategory = hotelRoomCategoryRepository.GetByKey(Id);

            return(AutoMapper.Mapper.Map <HotelRoomCategory, HotelRoomCategoryDataObject>(HotelRoomCategory));
        }