public static string HotelDelete(this UrlHelper urlHelper, HotelPart hotelPart)
 {
     return urlHelper.Action(
         "Delete",
         "HotelAdmin",
         new { destinationId = hotelPart.DestinationPart.Id, hotelId = hotelPart.Id, area = "Summit.Core" });
 }
 public void Publish(HotelPart hotelPart, DateTime scheduledPublishUtc)
 {
     publishingTaskManager.Publish(hotelPart.ContentItem, scheduledPublishUtc);
 }
 public void Publish(HotelPart hotelPart)
 {
     publishingTaskManager.DeleteTasks(hotelPart.ContentItem);
     contentManager.Publish(hotelPart.ContentItem);
 }
 public void Delete(HotelPart hotelPart)
 {
     publishingTaskManager.DeleteTasks(hotelPart.ContentItem);
     contentManager.Remove(hotelPart.ContentItem);
 }
 public DateTime? GetScheduledPublishUtc(HotelPart hotelPart)
 {
     var task = publishingTaskManager.GetPublishTask(hotelPart.ContentItem);
     return (task == null ? null : task.ScheduledUtc);
 }
 public void Unpublish(HotelPart hotelPart)
 {
     contentManager.Unpublish(hotelPart.ContentItem);
 }
        //private void UpdateHotelCount(HotelPart hotelPart)
        //{
        //    var commonPart = hotelPart.As<CommonPart>();
        //    if (commonPart != null && commonPart.Record.Container != null)
        //    {

        //        var destinationPart = hotelPart.DestinationPart
        //                              ??
        //                              this.destinationService.Get(commonPart.Record.Container.Id, VersionOptions.Published).
        //                                  As<DestinationPart>();

        //        // Ensure the "right" set of published posts for the blog is obtained
        //        destinationPart.ContentItem.ContentManager.Flush();
        //        destinationPart.PostCount = hotelService.PostCount(destinationPart);
        //    }
        //}

        private static void SetModelProperties(BuildShapeContext context, HotelPart hotelPart)
        {
            context.Shape.Blog = hotelPart.DestinationPart;
        }