Example #1
0
 public EventScheduleQueryResult Handle(EventScheduleQuery query)
 {
     try
     {
         FIL.Contracts.Models.CreateEventV1.EventScheduleModel eventScheduleModel = new FIL.Contracts.Models.CreateEventV1.EventScheduleModel();
         var currentEvent = _eventRepository.Get(query.EventId);
         if (currentEvent == null)
         {
             return(new EventScheduleQueryResult {
                 Success = true, EventScheduleModel = eventScheduleModel
             });
         }
         var currentEventDetail = _eventDetailRepository.GetByEventId(query.EventId);
         if (currentEventDetail == null)
         {
             eventScheduleModel.EventFrequencyType = Contracts.Enums.EventFrequencyType.Single;
             eventScheduleModel.StartDateTime      = DateTime.UtcNow;
             eventScheduleModel.EndDateTime        = DateTime.UtcNow;
             return(new EventScheduleQueryResult
             {
                 Success = true,
                 IsValidLink = true,
                 IsDraft = true,
                 EventScheduleModel = eventScheduleModel
             });
         }
         var eventAttribute   = _eventAttributeRepository.GetByEventDetailId(currentEventDetail.Id);
         var placeWeekOpenDay = _placeWeekOpenDaysRepository.GetByEventId(currentEvent.Id).FirstOrDefault();
         var dayTImeMappings  = _dayTimeMappingsRepository.GetAllByPlaceWeekOpenDay(placeWeekOpenDay.Id).FirstOrDefault();
         eventScheduleModel.DayId               = (int)placeWeekOpenDay.DayId;
         eventScheduleModel.StartDateTime       = currentEventDetail.StartDateTime;
         eventScheduleModel.EndDateTime         = currentEventDetail.EndDateTime;
         eventScheduleModel.EventDetailId       = currentEventDetail.Id;
         eventScheduleModel.IsEnabled           = currentEventDetail.IsEnabled;
         eventScheduleModel.LocalStartTime      = dayTImeMappings.StartTime;
         eventScheduleModel.LocalEndTime        = dayTImeMappings.EndTime;
         eventScheduleModel.TimeZoneAbbrivation = eventAttribute.TimeZoneAbbreviation;
         eventScheduleModel.TimeZoneOffset      = eventAttribute.TimeZone;
         eventScheduleModel.EventId             = currentEvent.Id;
         eventScheduleModel.EventFrequencyType  = currentEventDetail.EventFrequencyType;
         if (currentEventDetail.EventFrequencyType == Contracts.Enums.EventFrequencyType.Recurring)
         {
             eventScheduleModel.StartDateTime  = currentEventDetail.StartDateTime;
             eventScheduleModel.EndDateTime    = currentEventDetail.EndDateTime;
             eventScheduleModel.LocalStartTime = _localTimeZoneConvertProvider.ConvertToLocal(currentEventDetail.StartDateTime, eventAttribute.TimeZone).ToString(@"HH:mm", new CultureInfo("en-US"));
             eventScheduleModel.LocalEndTime   = _localTimeZoneConvertProvider.ConvertToLocal(currentEventDetail.EndDateTime, eventAttribute.TimeZone).ToString(@"HH:mm", new CultureInfo("en-US"));
         }
         else
         {
             eventScheduleModel.EventFrequencyType = currentEventDetail.EventFrequencyType;
         }
         return(new EventScheduleQueryResult
         {
             Success = true,
             IsDraft = false,
             IsValidLink = true,
             EventScheduleModel = eventScheduleModel
         });
     }
     catch (Exception e)
     {
         return(new EventScheduleQueryResult
         {
             IsValidLink = true,
             IsDraft = false
         });
     }
 }
        public FeelEventLearnPageQueryResult Handle(FeelEventLearnPageQuery query)
        {
            EventLearnPageQueryResults eventLearnMorePage = new EventLearnPageQueryResults();

            if (!String.IsNullOrWhiteSpace(query.Slug))
            {
                eventLearnMorePage = _eventLearnPageProvider.GetBySlug(query.Slug);
            }
            else
            {
                eventLearnMorePage = _eventLearnPageProvider.GetByAltId(query.EventAltId);
            }

            if (eventLearnMorePage.Event != null)
            {
                var eventCategoryMappings = _eventCategoryMappingRepository.GetByEventId(eventLearnMorePage.Event.Id).FirstOrDefault();
                if (eventCategoryMappings == null)
                {
                    return(new FeelEventLearnPageQueryResult());
                }
                var subCategoryDataModel = _eventCategoryRepository.Get(eventCategoryMappings.EventCategoryId);
                var subCategory          = AutoMapper.Mapper.Map <Contracts.Models.EventCategory>(subCategoryDataModel);
                var categoryDataModel    = _eventCategoryRepository.Get(subCategory.EventCategoryId);
                var category             = AutoMapper.Mapper.Map <Contracts.Models.EventCategory>(categoryDataModel);

                var clientPointOfContact      = _clientPointOfContactRepository.Get(eventLearnMorePage.Event.ClientPointOfContactId);
                var clientPointOfContactModel = AutoMapper.Mapper.Map <Contracts.Models.ClientPointOfContact>(clientPointOfContact);

                var eventTicketDetails     = _eventTicketDetailRepository.GetByEventDetailId(eventLearnMorePage.EventDetail.Id).Where(s => s.IsEnabled == true);
                var EventTicketDetailModel = AutoMapper.Mapper.Map <List <Contracts.Models.EventTicketDetail> >(eventTicketDetails);

                var eventTicketCategories      = _ticketCategoryRepository.GetByTicketCategoryIds(eventTicketDetails.Select(s => s.TicketCategoryId).Distinct());
                var eventTicketCategoriesModel = AutoMapper.Mapper.Map <List <Contracts.Models.TicketCategory> >(eventTicketCategories);

                var eventTicketAttributes      = _eventTicketAttributeRepository.GetByEventTicketDetailId(eventTicketDetails.Select(s => s.Id).Distinct());
                var eventTicketAttributesModel = AutoMapper.Mapper.Map <List <Contracts.Models.EventTicketAttribute> >(eventTicketAttributes);
                if (eventTicketAttributesModel.Count() == 0)
                {
                    return(new FeelEventLearnPageQueryResult {
                    });
                }
                var currencyMapping = _currencyTypeRepository.GetByCurrencyId(eventTicketAttributesModel.First().CurrencyId);

                var ratingDataModel = _ratingRepository.GetByEventId(eventLearnMorePage.Event.Id);
                var ratingModel     = AutoMapper.Mapper.Map <List <Contracts.Models.Rating> >(ratingDataModel);

                var userdataModel = _userRepository.GetByUserIds(ratingModel.Select(s => s.UserId).Distinct());
                var userModel     = AutoMapper.Mapper.Map <List <Contracts.Models.UserProfile> >(userdataModel);

                var           eventAmenities           = _eventAmenityRepository.GetByEventId(eventLearnMorePage.Event.Id);
                var           eventLearnMoreAttributes = _eventLearnMoreAttributeRepository.GetByEventId(eventLearnMorePage.Event.Id);
                var           learnMoreAttributes      = AutoMapper.Mapper.Map <List <Contracts.Models.EventLearnMoreAttribute> >(eventLearnMoreAttributes);
                var           ticketAlertEventMapping  = _ticketAlertEventMappingRepository.GetByEventId(eventCategoryMappings.EventId).FirstOrDefault();
                List <string> EventAmenitiesList       = new List <string>();
                foreach (var item in eventAmenities)
                {
                    var amenities = _amenityRepository.Get(item.AmenityId);
                    EventAmenitiesList.Add((amenities.Amenity).ToString());
                }
                var data = _calendarProvider.GetCalendarData(eventLearnMorePage.Event.Id);
                //For Hoho Routes
                var citySightSeeingRoute        = _citySightSeeingRouteRepository.GetByEventDetailId(eventLearnMorePage.EventDetail.Id);
                var citySightSeeingRouteDetails = _citySightSeeingRouteDetailRepository.GetByCitySightSeeingRouteIds(citySightSeeingRoute.Select(s => s.Id));

                //for Tiqets Places
                Contracts.Models.Tiqets.TiqetProductCheckoutDetail
                    tiqetCheckoutDetailsModel = new Contracts.Models.Tiqets.TiqetProductCheckoutDetail();
                if (eventLearnMorePage.Event.EventSourceId == EventSource.Tiqets)
                {
                    var tiqetEventDetailMapping = _tiqetEventDetailMappingRepository.GetByEventDetailId(eventLearnMorePage.EventDetail.Id);
                    var tiqetCheckoutDetails    = _tiqetProductCheckoutDetailRepository.GetByProductId(tiqetEventDetailMapping.ProductId);
                    tiqetCheckoutDetailsModel = Mapper.Map <Contracts.Models.Tiqets.TiqetProductCheckoutDetail>(tiqetCheckoutDetails);
                }

                //For Live Online Events
                List <EventHostMapping> eventHostMappings = new List <EventHostMapping>();
                DateTime formattedDateTime = new DateTime();
                string   eventDateTimeZome = string.Empty;
                if (eventLearnMorePage.Event.MasterEventTypeId == MasterEventType.Online)
                {
                    var eventHostMappingModel = _eventHostMappingRepository.GetAllByEventId(eventLearnMorePage.Event.Id);
                    eventHostMappings = AutoMapper.Mapper.Map <List <Contracts.Models.EventHostMapping> >(eventHostMappingModel);
                    var placeWeekOpenDays = _placeWeekOpenDaysRepository.GetByEventId(eventLearnMorePage.Event.Id).FirstOrDefault();
                    var dayTimeMapping    = _dayTimeMappingsRepository.GetAllByPlaceWeekOpenDay(placeWeekOpenDays.Id).FirstOrDefault();
                    var eventAttribute    = _eventAttributeRepository.GetByEventDetailId(eventLearnMorePage.EventDetail.Id);

                    //Getting Datetime for online Event
                    var eventDate      = _localTimeZoneConvertProvider.ConvertToLocal(eventLearnMorePage.EventDetail.StartDateTime, eventAttribute.TimeZone);
                    var dateTimeString = eventDate.ToString("yyyy/MM/dd") + " " + dayTimeMapping.StartTime + ":00.000";
                    formattedDateTime = DateTime.Parse(dateTimeString);

                    eventDateTimeZome = eventAttribute.TimeZoneAbbreviation;
                }
                return(new FeelEventLearnPageQueryResult
                {
                    EventType = (EventType)eventLearnMorePage.EventType,
                    EventCategory = eventLearnMorePage.EventCategory,
                    Event = eventLearnMorePage.Event,
                    EventDetail = eventLearnMorePage.EventDetail,
                    Venue = eventLearnMorePage.Venue,
                    City = eventLearnMorePage.City,
                    State = eventLearnMorePage.State,
                    Country = eventLearnMorePage.Country,
                    EventTicketAttribute = eventTicketAttributesModel,
                    EventTicketDetail = EventTicketDetailModel,
                    CurrencyType = Mapper.Map <CurrencyType>(currencyMapping),
                    Rating = ratingModel,
                    TicketCategory = eventTicketCategoriesModel,
                    User = userModel,
                    EventAmenitiesList = EventAmenitiesList,
                    ClientPointOfContact = clientPointOfContactModel,
                    EventGalleryImage = eventLearnMorePage.EventGalleryImage,
                    EventLearnMoreAttributes = learnMoreAttributes,
                    RegularTimeModel = data.RegularTimeModel,
                    SeasonTimeModel = data.SeasonTimeModel,
                    SpecialDayModel = data.SpecialDayModel,
                    Category = category,
                    SubCategory = subCategory,
                    CitySightSeeingRoutes = Mapper.Map <IEnumerable <FIL.Contracts.Models.CitySightSeeing.CitySightSeeingRoute> >(citySightSeeingRoute),
                    CitySightSeeingRouteDetails = Mapper.Map <IEnumerable <FIL.Contracts.Models.CitySightSeeing.CitySightSeeingRouteDetail> >(citySightSeeingRouteDetails),
                    TiqetsCheckoutDetails = tiqetCheckoutDetailsModel,
                    EventHostMappings = eventHostMappings,
                    OnlineStreamStartTime = formattedDateTime,
                    OnlineEventTimeZone = eventDateTimeZome,
                    TicketAlertEventMapping = ticketAlertEventMapping
                });
            }
            return(new FeelEventLearnPageQueryResult());
        }
 protected override async Task <ICommandResult> Handle(StripeConnectAccountCommand command)
 {
     try
     {
         var eventData = _eventRepository.GetByAltId(command.EventId);
         if (eventData != null)
         {
             var eventDetails          = _eventDetailRepository.GetByEventId(eventData.Id);
             var eventTicketDetails    = _eventTicketDetailRepository.GetByEventDetailId(eventDetails.Id);
             var ticketCategories      = _ticketCategoryRepository.GetByTicketCategoryIds(eventTicketDetails.Select(s => s.TicketCategoryId));
             var eventTicketAttributes = _eventTicketAttributeRepository.GetByEventTicketDetailId(eventTicketDetails.Select(s => s.Id));
             var placeWeekOpenDay      = _placeWeekOpenDaysRepository.GetByEventId(eventData.Id).FirstOrDefault();
             var dayTimeMappings       = _dayTimeMappingsRepository.GetAllByPlaceWeekOpenDay(placeWeekOpenDay.Id).FirstOrDefault();
             var eventCategoryMappings = _eventCategoryMappingRepository.GetByEventId(eventData.Id).FirstOrDefault();
             var subCategory           = _eventCategoryRepository.Get(eventCategoryMappings.EventCategoryId);
             var user           = _userRepository.GetByAltId(eventData.CreatedBy);
             var currencyType   = _currencyTypeRepository.Get(eventTicketAttributes.FirstOrDefault().CurrencyId);
             var eventAttribute = _eventAttributeRepository.GetByEventDetailId(eventDetails.Id);
             eventDetails.StartDateTime = _localTimeZoneConvertProvider.ConvertToLocal(eventDetails.StartDateTime, eventAttribute.TimeZone);
             var stripeConnectAccountId = command.IsStripeConnect ? _generateStripeConnectProvider.GenerateStripeAccessToken(command.AuthorizationCode, command.channels, eventData.Id) : null;
             if (stripeConnectAccountId != null && stripeConnectAccountId != "")
             {
                 var eventStripeConnect = _eventStripeConnectMasterRepository.GetByEventId(eventData.Id);
                 var eventStepDetails   = _stepProvider.SaveEventStepDetails(eventData.Id, 9, true, command.ModifiedBy);
                 var stripeConnnect     = new EventStripeConnectMaster
                 {
                     Id = eventStripeConnect != null ? eventStripeConnect.Id : 0,
                     StripeConnectAccountID = stripeConnectAccountId,
                     CreatedBy                = eventStripeConnect != null ? eventStripeConnect.CreatedBy : command.ModifiedBy,
                     CreatedUtc               = eventStripeConnect != null ? eventStripeConnect.CreatedUtc : DateTime.UtcNow,
                     ExtraCommisionFlat       = command.ExtraCommisionFlat,
                     ExtraCommisionPercentage = command.ExtraCommisionPercentage,
                     EventId    = eventData.Id,
                     IsEnabled  = true,
                     ModifiedBy = command.ModifiedBy,
                     UpdatedBy  = command.ModifiedBy,
                     UpdatedUtc = DateTime.UtcNow,
                 };
                 _eventStripeConnectMasterRepository.Save(stripeConnnect);
             }
             return(new StripeConnectAccountCommandResult
             {
                 Success = true,
                 EventTicketAttribute = eventTicketAttributes.ToList(),
                 DayTimeMappings = dayTimeMappings,
                 Event = eventData,
                 EventDetail = eventDetails,
                 EventTicketDetail = eventTicketDetails.ToList(),
                 TicketCategories = ticketCategories.ToList(),
                 ParentCategoryId = subCategory.EventCategoryId,
                 CurrencyType = currencyType,
                 Email = user.Email
             });
         }
         else
         {
             return(new StripeConnectAccountCommandResult {
             });
         }
     }
     catch (Exception e)
     {
         _logger.Log(FIL.Logging.Enums.LogCategory.Error, e);
         return(new StripeConnectAccountCommandResult {
         });
     }
 }
Example #4
0
        public GetPlaceInventoryQueryResult GetCalendarData(long eventId)
        {
            /*-------------------------- Regular Time --------------------------*/
            var placeWeekOpenDays = _placeWeekOpenDaysRepository.GetByEventId(eventId).ToList();
            var allDays           = _daysRepository.GetAll().ToList();
            var regular           = new RegularViewModel();

            if (placeWeekOpenDays.Any())
            {
                bool[] openDays = new bool[8];
                var    i        = 0;
                foreach (FIL.Contracts.DataModels.PlaceWeekOpenDays currentPlaceWeek in placeWeekOpenDays)
                {
                    openDays[currentPlaceWeek.DayId] = true;
                    i = i + 1;
                }
                if (i == 7)
                {
                    openDays[0] = true;
                }
                if (placeWeekOpenDays[0].IsSameTime)
                {
                    i = 0;
                    var dayTimeMappings = _dayTimeMappingsRepository.GetAllByPlaceWeekOpenDay(placeWeekOpenDays[0].Id).ToList();
                    List <TimeViewModel>       timeModels       = new List <TimeViewModel>();
                    List <CustomTimeModelData> customTimeModels = new List <CustomTimeModelData>();
                    foreach (FIL.Contracts.DataModels.DayTimeMappings daysTime in dayTimeMappings)
                    {
                        var newTimeModel = new TimeViewModel();
                        newTimeModel.Id   = i + 1;
                        newTimeModel.From = daysTime.StartTime;
                        newTimeModel.To   = daysTime.EndTime;
                        i = i + 1;
                        timeModels.Add(newTimeModel);
                    }
                    regular.TimeModel = timeModels;
                    i = 0;
                    foreach (FIL.Contracts.DataModels.PlaceWeekOpenDays currentPlaceWeek in placeWeekOpenDays)
                    {
                        var newCustomTimeModel = new CustomTimeModelData();
                        timeModels = new List <TimeViewModel>();
                        var newTimeModel = new TimeViewModel();
                        var currentDay   = _daysRepository.Get(currentPlaceWeek.DayId);
                        newCustomTimeModel.Id  = i + 1;
                        newCustomTimeModel.Day = currentDay.Name;
                        newTimeModel.Id        = i + 1;
                        newTimeModel.From      = "";
                        newTimeModel.To        = "";
                        timeModels.Add(newTimeModel);
                        newCustomTimeModel.Time = timeModels;
                        customTimeModels.Add(newCustomTimeModel);
                        i = i + 1;
                    }
                    regular.CustomTimeModel = customTimeModels;
                }
                else if (!placeWeekOpenDays[0].IsSameTime)
                {
                    i = 0;
                    var dayTimeMappings = _dayTimeMappingsRepository.GetAllByPlaceWeekOpenDay(placeWeekOpenDays[0].Id).ToList();
                    List <TimeViewModel>       timeModels       = new List <TimeViewModel>();
                    List <CustomTimeModelData> customTimeModels = new List <CustomTimeModelData>();
                    var newTimeModel = new TimeViewModel();
                    newTimeModel.Id   = i + 1;
                    newTimeModel.From = "";
                    newTimeModel.To   = "";
                    timeModels.Add(newTimeModel);
                    regular.TimeModel = timeModels;
                    i = 0;
                    foreach (FIL.Contracts.DataModels.PlaceWeekOpenDays currentPlaceWeek in placeWeekOpenDays)
                    {
                        var newCustomTimeModel     = new CustomTimeModelData();
                        var currentDayTimeMappings = _dayTimeMappingsRepository.GetAllByPlaceWeekOpenDay(currentPlaceWeek.Id).ToList();
                        var currentDay             = _daysRepository.Get(currentPlaceWeek.DayId);
                        timeModels = new List <TimeViewModel>();
                        var index = 0;
                        foreach (FIL.Contracts.DataModels.DayTimeMappings currentTime in currentDayTimeMappings)
                        {
                            var currentTimeModel = new TimeViewModel();
                            currentTimeModel.Id   = index + 1;
                            currentTimeModel.From = currentTime.StartTime;
                            currentTimeModel.To   = currentTime.EndTime;
                            timeModels.Add(currentTimeModel);
                            index = index + 1;
                        }
                        newCustomTimeModel.Time = timeModels;
                        newCustomTimeModel.Day  = currentDay.Name;
                        newCustomTimeModel.Id   = i + 1;
                        customTimeModels.Add(newCustomTimeModel);
                        i = i + 1;
                    }
                    regular.CustomTimeModel = customTimeModels;
                }
                regular.IsSameTime = placeWeekOpenDays[0].IsSameTime;
                regular.DaysOpen   = openDays.OfType <bool>().ToList();
            }
            else
            {
                if (regular.CustomTimeModel == null)
                {
                    regular.CustomTimeModel = new List <CustomTimeModelData>();
                }
                if (regular.TimeModel == null)
                {
                    regular.TimeModel = new List <TimeViewModel>();
                }
                if (regular.DaysOpen == null)
                {
                    bool[] openDays = new bool[8];
                    regular.DaysOpen = openDays.OfType <bool>().ToList();
                }
                regular.IsSameTime = true;
            }

            /*-------------------------- Season Time --------------------------*/
            var season             = new List <SeasonViewModel>();
            var placeSeasonDetails = _placeSeasonDetailsRepository.GetByEventId(eventId).ToList();
            var seasonIndex        = 0;

            foreach (FIL.Contracts.DataModels.PlaceSeasonDetails currentSeason in placeSeasonDetails)
            {
                var seasonDaysMappings             = _seasonDaysMappingsRepository.GetByPlaceSeasonDetailId(currentSeason.Id).ToList();
                var newSeasonViewModel             = new SeasonViewModel();
                List <TimeViewModel> timeModelList = new List <TimeViewModel>();
                List <SpeecialDateSeasonTimeViewModel> speecialDateSeasonTimeList = new List <SpeecialDateSeasonTimeViewModel>();
                bool[] openDays = new bool[8];

                if (currentSeason.IsSameTime && seasonDaysMappings.Any())
                {
                    var seasonSameTiming = _seasonDayTimeMappingsRepository.GetSeasonDaysMappings(seasonDaysMappings[0].Id).ToList();

                    var timeIndex = 0;
                    foreach (FIL.Contracts.DataModels.SeasonDaysTimeMapping currentSeasonTime in seasonSameTiming)
                    {
                        var timeModel = new TimeViewModel();
                        timeModel.Id   = timeIndex;
                        timeModel.From = currentSeasonTime.StartTime;
                        timeModel.To   = currentSeasonTime.EndTime;
                        timeIndex      = timeIndex + 1;
                        timeModelList.Add(timeModel);
                    }
                    timeIndex = 0;
                    foreach (FIL.Contracts.DataModels.SeasonDaysMapping currentSeasonDay in seasonDaysMappings)
                    {
                        var speecialDateSeasonTime = new SpeecialDateSeasonTimeViewModel();

                        var currentDay = _daysRepository.Get(currentSeasonDay.DayId);
                        var timeModels = new List <TimeViewModel>();
                        var timeModel  = new TimeViewModel();
                        timeModel.Id   = 1;
                        timeModel.From = "";
                        timeModel.To   = "";
                        timeModels.Add(timeModel);
                        speecialDateSeasonTime.Id        = timeIndex + 1;
                        speecialDateSeasonTime.Day       = currentDay.Name;
                        speecialDateSeasonTime.Time      = timeModels;
                        openDays[currentSeasonDay.DayId] = true;
                        timeIndex = timeIndex + 1;
                        speecialDateSeasonTimeList.Add(speecialDateSeasonTime);
                    }
                }
                else if (!currentSeason.IsSameTime)
                {
                    var timeIndex = 0;
                    var timeModel = new TimeViewModel();
                    timeModel.Id   = 1;
                    timeModel.From = "";
                    timeModel.To   = "";
                    timeModelList.Add(timeModel);
                    foreach (FIL.Contracts.DataModels.SeasonDaysMapping currentSeasonDay in seasonDaysMappings)
                    {
                        var speecialDateSeasonTime = new SpeecialDateSeasonTimeViewModel();
                        var currentDay             = _daysRepository.Get(currentSeasonDay.DayId);
                        var timeModels             = new List <TimeViewModel>();
                        var seasonSpecialTime      = _seasonDayTimeMappingsRepository.GetSeasonDaysMappings(currentSeasonDay.Id);
                        var seasonTimeIndex        = 0;
                        foreach (FIL.Contracts.DataModels.SeasonDaysTimeMapping currentSeasonDayTime in seasonSpecialTime)
                        {
                            timeModel      = new TimeViewModel();
                            timeModel.Id   = seasonTimeIndex + 1;
                            timeModel.To   = currentSeasonDayTime.EndTime;
                            timeModel.From = currentSeasonDayTime.StartTime;
                            timeModels.Add(timeModel);
                            seasonTimeIndex = seasonTimeIndex + 1;
                        }
                        openDays[currentSeasonDay.DayId] = true;
                        speecialDateSeasonTime.Id        = timeIndex + 1;
                        speecialDateSeasonTime.Day       = currentDay.Name;
                        speecialDateSeasonTime.Time      = timeModels;
                        speecialDateSeasonTimeList.Add(speecialDateSeasonTime);
                        timeIndex = timeIndex + 1;
                    }
                }
                newSeasonViewModel.Id         = seasonIndex + 1;
                newSeasonViewModel.SameTime   = timeModelList;
                newSeasonViewModel.Time       = speecialDateSeasonTimeList;
                newSeasonViewModel.StartDate  = currentSeason.StartDate.AddHours(5).AddMinutes(30);
                newSeasonViewModel.EndDate    = currentSeason.EndDate.AddHours(5).AddMinutes(30);
                newSeasonViewModel.Name       = currentSeason.Name;
                newSeasonViewModel.IsSameTime = currentSeason.IsSameTime;
                newSeasonViewModel.DaysOpen   = openDays.OfType <bool>().ToList();
                seasonIndex = seasonIndex + 1;
                season.Add(newSeasonViewModel);
            }
            /*-------------------------- Special day/Holiday Time --------------------------*/
            var specialDay      = new List <SpecialDayViewModel>();
            var specialDays     = _placeSpecialDayTimeMappingsRepository.GetAllByEventId(eventId);
            var specialDayindex = 0;

            foreach (FIL.Contracts.DataModels.PlaceSpecialDayTimeMappings currentSpecialDay in specialDays)
            {
                var newSpecialDay = new SpecialDayViewModel();
                newSpecialDay.Id          = specialDayindex + 1;
                newSpecialDay.Name        = currentSpecialDay.Name;
                newSpecialDay.From        = currentSpecialDay.StartTime;
                newSpecialDay.To          = currentSpecialDay.EndTime;
                newSpecialDay.SpecialDate = currentSpecialDay.SpecialDate.AddHours(5).AddMinutes(30);
                specialDayindex           = specialDayindex + 1;
                specialDay.Add(newSpecialDay);
            }

            return(new GetPlaceInventoryQueryResult
            {
                SeasonTimeModel = season,
                SpecialDayModel = specialDay,
                RegularTimeModel = regular
            });
        }