public async Task <FoodMenuBgPhotoForReturnDto> Update(FoodMenuBgPhotoForCreationDto creationDto)
        {
            var photo = await foodMenuBgPhotoService.Update(creationDto);

            var onlineScreens = await onlineScreenService.GetAllOnlineScreenConnectionId();

            if (onlineScreens != null && onlineScreens.Length != 0)
            {
                await kiosksHub.Clients.Clients(onlineScreens).SendAsync("ReloadScreen", true);
            }

            return(photo);
        }
예제 #2
0
        public async Task <AnnouncePhotoForReturnDto> Update(AnnouncePhotoForCretionDto creationDto)
        {
            var photo = await announcePhotoService.Update(creationDto);

            var connIds = await userTracker.GetOnlineUser();

            if (connIds != null && connIds.Length != 0)
            {
                await hubContext.Clients.GroupExcept("Announce", connIds).SendAsync("ReceiveNewPhotoAnnounce", photo, "update");
            }
            var onlineScreens = await onlineScreenService.GetAllOnlineScreenConnectionId();

            if (onlineScreens != null && onlineScreens.Length != 0)
            {
                await kiosksHub.Clients.Clients(onlineScreens).SendAsync("ReloadScreen", true);
            }

            return(photo);
        }
        public async Task <ActionResult <FoodMenuForReturnDto> > Update(FoodMenuForCreationDto updateDto)
        {
            var foodMenu = await foodMenuService.Update(updateDto);

            var connIds = await userTracker.GetOnlineUser();

            if (connIds != null && connIds.Length != 0)
            {
                await hubContext.Clients.GroupExcept("FoodMenu", connIds).SendAsync("ReceiveUpdateFoodMenu", foodMenu);
            }
            var onlineScreens = await onlineScreenService.GetAllOnlineScreenConnectionId();

            if (onlineScreens != null && onlineScreens.Length != 0)
            {
                await kiosksHub.Clients.Clients(onlineScreens).SendAsync("ReloadScreen", true);
            }

            return(foodMenu);
        }
예제 #4
0
        public async Task <ActionResult <NewsForReturnDto> > Update(NewsForCreationDto updateDto)
        {
            var news = await newsService.Update(updateDto);

            var connIds = await userTracker.GetOnlineUser();

            if (connIds != null && connIds.Length != 0)
            {
                await hubContext.Clients.GroupExcept("News", connIds).SendAsync("ReceiveUpdateNews", news);
            }

            var screenConnectionId = await onlineScreenService.GetAllOnlineScreenConnectionId();

            if (screenConnectionId != null && screenConnectionId.Length != 0)
            {
                await kiosksHub.Clients.Clients(screenConnectionId).SendAsync("ReloadScreen", true);
            }

            return(news);
        }
        public async Task <ActionResult <VehicleAnnounceForReturnDto> > Update(VehicleAnnounceForCreationDto creationDto)
        {
            var vehicleAnnounce = await vehicleAnnounceService.Update(creationDto);

            var connIds = await userTracker.GetOnlineUser();

            if (connIds != null && connIds.Length != 0)
            {
                await hubContext.Clients.GroupExcept("Car", connIds).SendAsync("ReceiveUpdateVehicleannounce", vehicleAnnounce);
            }

            var screenConnectionId = await onlineScreenService.GetAllOnlineScreenConnectionId();

            if (screenConnectionId != null && screenConnectionId.Length != 0)
            {
                await kiosksHub.Clients.Clients(screenConnectionId).SendAsync("ReloadScreen", true);
            }

            return(vehicleAnnounce);
        }
예제 #6
0
        public async Task <ActionResult <HomeAnnounceForReturnDto> > Update(HomeAnnounceForCreationDto updateDto)
        {
            var homeAnnounce = await homeAnnounceService.Update(updateDto);

            var connIds = await userTracker.GetOnlineUser();

            if (connIds != null && connIds.Length != 0)
            {
                await hubContext.Clients.GroupExcept("Home", connIds).SendAsync("ReceiveUpdateHomeAnnounce", homeAnnounce);
            }

            var onlineScreensConnectionId = await onlineScreenService.GetAllOnlineScreenConnectionId();

            if (onlineScreensConnectionId != null && onlineScreensConnectionId.Length != 0)
            {
                await kiosksHub.Clients.Clients(onlineScreensConnectionId).SendAsync("ReloadScreen", true);
            }

            return(homeAnnounce);
        }
예제 #7
0
        public async Task <ActionResult <CurrencyForReturnDto> > Update(CurrencyForCreationDto updateDto)
        {
            var currency = await currencyService.Update(updateDto);

            var onlineScreensConnectionId = await onlineScreenService.GetAllOnlineScreenConnectionId();

            if (onlineScreensConnectionId != null && onlineScreensConnectionId.Length != 0)
            {
                var currencyForKisosk = await exchangeRateService.GetExChangeRateAsync();

                if (currencyForKisosk != null)
                {
                    await kiosksHub.Clients.Clients(onlineScreensConnectionId).SendAsync("ReceiveExchangeRate", currencyForKisosk);
                }
            }
            return(currency);
        }
예제 #8
0
        public async Task <ActionResult <CityForReturnDto> > Update(CityForCreationDto updateDto)
        {
            var city = await cityService.Update(updateDto);

            var onlineScreens = await onlineScreenService.GetAllOnlineScreenConnectionId();

            if (onlineScreens != null && onlineScreens.Length != 0)
            {
                var foreCastsForKiosks = await wheatherForeCastService.WheatherForeCastsAsync();

                if (foreCastsForKiosks != null)
                {
                    await kiosksHub.Clients.Clients(onlineScreens).SendAsync("ReceiveWheatherForeCast", foreCastsForKiosks);
                }
            }
            return(city);
        }