Example #1
0
        public TeamPageApiController(IWorkContext workContext,
                                     ITeamPageService teamPageService,
                                     ITeamPageGroupService teamPageGroupService,
                                     ITeamPageGroupMemberService teamPageGroupMemberService,
                                     ICustomerService customerService,
                                     ICustomerProfileViewService customerProfileViewService,
                                     IDateTimeHelper dateTimeHelper,
                                     ICustomerProfileService customerProfileService,
                                     IPictureService pictureService,
                                     MediaSettings mediaSettings,
                                     mobSocialSettings mobSocialSettings)
        {
            _workContext                = workContext;
            _teamPageService            = teamPageService;
            _teamPageGroupService       = teamPageGroupService;
            _teamPageGroupMemberService = teamPageGroupMemberService;
            _customerService            = customerService;
            _dateTimeHelper             = dateTimeHelper;
            _customerProfileService     = customerProfileService;
            _pictureService             = pictureService;
            _mediaSettings              = mediaSettings;
            _mobSocialSettings          = mobSocialSettings;
            _customerProfileViewService = customerProfileViewService;

            Mapper.Initialize(cfg => cfg.CreateMap <TeamPageModel, ConfigurationModel>());
            Mapper.Initialize(cfg => cfg.CreateMap <TeamPageModel, TeamPage>());
            Mapper.Initialize(cfg => cfg.CreateMap <TeamPageGroupModel, GroupPage>());
        }
Example #2
0
 public PaymentProcessingService(mobSocialSettings mobSocialSettings, IPluginFinder pluginFinder, IMobSecurityService mobSecurityService, IStoreContext storeContext)
 {
     _mobSocialSettings  = mobSocialSettings;
     _pluginFinder       = pluginFinder;
     _mobSecurityService = mobSecurityService;
     _storeContext       = storeContext;
 }
 public mobSocialApiController(IPermissionService permissionService,
     IWorkContext workContext, AdminAreaSettings adminAreaSettings, ILocalizationService localizationService,
     IPictureService pictureService, IMobSocialService socialNetworkService, ICustomerService customerService,
     ICustomerAlbumPictureService customerAlbumPictureService, mobSocialSettings mobSocialSettings, MediaSettings mediaSettings, CustomerSettings customerSettings, 
     ForumSettings forumSettings, RewardPointsSettings rewardPointsSettings, OrderSettings orderSettings,
      IStoreContext storeContext, IWebHelper webHelper, IUrlRecordService urlRecordService, IRepository<UrlRecord> urlRecordRepository,
     ICustomerVideoAlbumService customerVideoAlbumService, CustomerProfileViewService customerProfileViewService)
 {
     _permissionService = permissionService;
     _workContext = workContext;
     _adminAreaSettings = adminAreaSettings;
     _localizationService = localizationService;
     _pictureService = pictureService;
     _socialNetworkService = socialNetworkService;
     _customerService = customerService;
     _customerAlbumPictureService = customerAlbumPictureService;
     _mobSocialSettings = mobSocialSettings;
     _mediaSettings = mediaSettings;
     _customerSettings = customerSettings;
     _forumSettings = forumSettings;
     _rewardPointsSettings = rewardPointsSettings;
     _orderSettings = orderSettings;
     _storeContext = storeContext;
     _webHelper = webHelper;
     _urlRecordService = urlRecordService;
     _urlRecordRepository = urlRecordRepository;
     _customerVideoAlbumService = customerVideoAlbumService;
     _customerProfileViewService = customerProfileViewService;
 }
Example #4
0
 public mobSocialApiController(IPermissionService permissionService,
                               IWorkContext workContext, AdminAreaSettings adminAreaSettings, ILocalizationService localizationService,
                               IPictureService pictureService, IMobSocialService socialNetworkService, ICustomerService customerService,
                               ICustomerAlbumPictureService customerAlbumPictureService, mobSocialSettings mobSocialSettings, MediaSettings mediaSettings, CustomerSettings customerSettings,
                               ForumSettings forumSettings, RewardPointsSettings rewardPointsSettings, OrderSettings orderSettings,
                               IStoreContext storeContext, IWebHelper webHelper, IUrlRecordService urlRecordService, IRepository <UrlRecord> urlRecordRepository,
                               ICustomerVideoAlbumService customerVideoAlbumService, CustomerProfileViewService customerProfileViewService, IGenericAttributeService genericAttributeService, ICustomerProfileService customerProfileService)
 {
     _permissionService           = permissionService;
     _workContext                 = workContext;
     _adminAreaSettings           = adminAreaSettings;
     _localizationService         = localizationService;
     _pictureService              = pictureService;
     _socialNetworkService        = socialNetworkService;
     _customerService             = customerService;
     _customerAlbumPictureService = customerAlbumPictureService;
     _mobSocialSettings           = mobSocialSettings;
     _mediaSettings               = mediaSettings;
     _customerSettings            = customerSettings;
     _forumSettings               = forumSettings;
     _rewardPointsSettings        = rewardPointsSettings;
     _orderSettings               = orderSettings;
     _storeContext                = storeContext;
     _webHelper                  = webHelper;
     _urlRecordService           = urlRecordService;
     _urlRecordRepository        = urlRecordRepository;
     _customerVideoAlbumService  = customerVideoAlbumService;
     _customerProfileViewService = customerProfileViewService;
     _genericAttributeService    = genericAttributeService;
     _customerProfileService     = customerProfileService;
 }
 public CustomerProfileViewService(
     IMobRepository <CustomerProfileView> customerProfileViewRepository,
     IWorkContext workContext,
     mobSocialSettings mobSocialSettings)
     : base(customerProfileViewRepository)
 {
     _mobSocialSettings = mobSocialSettings;
     _workContext       = workContext;
 }
Example #6
0
 public EchoNestMusicService(IWorkContext workContext,
                             mobSocialSettings mobSocialSettings,
                             IOAuthCredentials credentials,
                             IApiUri apiUri)
 {
     _mobSocialSettings = mobSocialSettings;
     _workContext       = workContext;
     _credentials       = credentials;
     _apiUri            = apiUri;
 }
Example #7
0
 public ReminderNotificationsTask(IPluginFinder pluginFinder, IMobSocialMessageService mobSocialMessageService, IVideoBattleService videoBattleService, IVideoBattleVideoService videoBattleVideoService, IVideoBattleVoteService videoBattleVoteService, mobSocialSettings mobSocialSettings, IVideoBattleParticipantService videoBattleParticipantService, ICustomerService customerService, IWorkContext workContext, IStoreContext storeContext, ICustomerFollowService customerFollowService, IDateTimeHelper dateTimeHelper)
 {
     _pluginFinder                  = pluginFinder;
     _mobSocialMessageService       = mobSocialMessageService;
     _videoBattleService            = videoBattleService;
     _videoBattleVideoService       = videoBattleVideoService;
     _videoBattleVoteService        = videoBattleVoteService;
     _mobSocialSettings             = mobSocialSettings;
     _videoBattleParticipantService = videoBattleParticipantService;
     _customerService               = customerService;
     _workContext           = workContext;
     _storeContext          = storeContext;
     _customerFollowService = customerFollowService;
     _dateTimeHelper        = dateTimeHelper;
 }
Example #8
0
 public VoterPassService(IMobRepository <VoterPass> repository,
                         IWorkContext workContext,
                         IStoreContext storeContext,
                         IOrderService orderService,
                         IProductService productService,
                         IWebHelper webHelper,
                         mobSocialSettings mobSocialSettings) : base(repository)
 {
     _workContext       = workContext;
     _storeContext      = storeContext;
     _orderService      = orderService;
     _productService    = productService;
     _webHelper         = webHelper;
     _mobSocialSettings = mobSocialSettings;
 }
Example #9
0
 public ArtistPageController(ILocalizationService localizationService,
                             IPictureService pictureService,
                             ICustomerService customerService,
                             IDateTimeHelper dateTimeHelper,
                             CustomerSettings customerSettings,
                             MediaSettings mediaSettings,
                             IArtistPageService artistPageService,
                             IArtistPageAPIService artistPageApiService,
                             IArtistPageManagerService artistPageManagerService,
                             IMusicService musicService,
                             mobSocialSettings mobSocialSettings,
                             IMobSocialService mobSocialService,
                             IWorkContext workContext,
                             IDownloadService downloadService,
                             IProductService productService,
                             IOrderService orderService,
                             IStoreContext storeContext,
                             TaxSettings taxSettings,
                             ISongService songService,
                             IPriceFormatter priceFormatter,
                             IArtistPagePaymentService artistPagePaymentService)
 {
     _localizationService      = localizationService;
     _pictureService           = pictureService;
     _customerService          = customerService;
     _dateTimeHelper           = dateTimeHelper;
     _customerSettings         = customerSettings;
     _mediaSettings            = mediaSettings;
     _artistPageService        = artistPageService;
     _mobSocialSettings        = mobSocialSettings;
     _mobSocialService         = mobSocialService;
     _workContext              = workContext;
     _artistPageApiService     = artistPageApiService;
     _artistPageManagerService = artistPageManagerService;
     _musicService             = musicService;
     _downloadService          = downloadService;
     _productService           = productService;
     _orderService             = orderService;
     _storeContext             = storeContext;
     _taxSettings              = taxSettings;
     _songService              = songService;
     _priceFormatter           = priceFormatter;
     _artistPagePaymentService = artistPagePaymentService;
 }
Example #10
0
 public SongController(ILocalizationService localizationService,
                       IPictureService pictureService,
                       ICustomerService customerService,
                       IDateTimeHelper dateTimeHelper,
                       CustomerSettings customerSettings,
                       MediaSettings mediaSettings,
                       IArtistPageService artistPageService,
                       IArtistPageAPIService artistPageApiService,
                       ISongService songService,
                       IMusicService musicService,
                       mobSocialSettings mobSocialSettings,
                       IMobSocialService mobSocialService,
                       IWorkContext workContext,
                       IMobSocialMessageService mobsocialMessageService,
                       ISharedSongService sharedSongService,
                       IStoreContext storeContext,
                       IProductService productService,
                       IDownloadService downloadService,
                       IPriceFormatter priceFormatter)
 {
     _localizationService     = localizationService;
     _pictureService          = pictureService;
     _customerService         = customerService;
     _dateTimeHelper          = dateTimeHelper;
     _customerSettings        = customerSettings;
     _mediaSettings           = mediaSettings;
     _mobSocialSettings       = mobSocialSettings;
     _mobSocialService        = mobSocialService;
     _workContext             = workContext;
     _artistPageApiService    = artistPageApiService;
     _artistPageService       = artistPageService;
     _songService             = songService;
     _musicService            = musicService;
     _mobsocialMessageService = mobsocialMessageService;
     _sharedSongService       = sharedSongService;
     _storeContext            = storeContext;
     _productService          = productService;
     _downloadService         = downloadService;
     _priceFormatter          = priceFormatter;
 }
Example #11
0
 public SongController(ILocalizationService localizationService,
     IPictureService pictureService,
     ICustomerService customerService,
     IDateTimeHelper dateTimeHelper,
     CustomerSettings customerSettings,
     MediaSettings mediaSettings,
     IArtistPageService artistPageService,
     IArtistPageAPIService artistPageApiService,
     ISongService songService,
     IMusicService musicService,
     mobSocialSettings mobSocialSettings,
     IMobSocialService mobSocialService,
     IWorkContext workContext,
     IMobSocialMessageService mobsocialMessageService,
     ISharedSongService sharedSongService,
     IStoreContext storeContext,
     IProductService productService,
     IDownloadService downloadService,
     IPriceFormatter priceFormatter)
 {
     _localizationService = localizationService;
     _pictureService = pictureService;
     _customerService = customerService;
     _dateTimeHelper = dateTimeHelper;
     _customerSettings = customerSettings;
     _mediaSettings = mediaSettings;
     _mobSocialSettings = mobSocialSettings;
     _mobSocialService = mobSocialService;
     _workContext = workContext;
     _artistPageApiService = artistPageApiService;
     _artistPageService = artistPageService;
     _songService = songService;
     _musicService = musicService;
     _mobsocialMessageService = mobsocialMessageService;
     _sharedSongService = sharedSongService;
     _storeContext = storeContext;
     _productService = productService;
     _downloadService = downloadService;
     _priceFormatter = priceFormatter;
 }
 public CustomerProfileApiController(CustomerProfileService customerProfileService,
     CustomerProfileViewService customerProfileViewService,
     ICustomerService customerService,
     IMobSocialService mobSocialService,
     ICustomerFavoriteSongService customerFavoriteSongService,
     IMusicService musicService,
     IWorkContext workContext, IFriendService friendService, IPictureService pictureService, mobSocialSettings mobSocialSettings, MediaSettings mediaSettings, IGenericAttributeService genericAttributeService, ICustomerFollowService customerFollowService)
 {
     _customerProfileService = customerProfileService;
     _customerProfileViewService = customerProfileViewService;
     _customerService = customerService;
     _customerFavoriteSongService = customerFavoriteSongService;
     _mobSocialService = mobSocialService;
     _musicService = musicService;
     _workContext = workContext;
     _friendService = friendService;
     _pictureService = pictureService;
     _mobSocialSettings = mobSocialSettings;
     _mediaSettings = mediaSettings;
     _genericAttributeService = genericAttributeService;
     _customerFollowService = customerFollowService;
 }
 public CustomerProfileApiController(CustomerProfileService customerProfileService,
                                     CustomerProfileViewService customerProfileViewService,
                                     ICustomerService customerService,
                                     IMobSocialService mobSocialService,
                                     ICustomerFavoriteSongService customerFavoriteSongService,
                                     IMusicService musicService,
                                     IWorkContext workContext, IFriendService friendService, IPictureService pictureService, mobSocialSettings mobSocialSettings, MediaSettings mediaSettings, IGenericAttributeService genericAttributeService, ICustomerFollowService customerFollowService)
 {
     _customerProfileService      = customerProfileService;
     _customerProfileViewService  = customerProfileViewService;
     _customerService             = customerService;
     _customerFavoriteSongService = customerFavoriteSongService;
     _mobSocialService            = mobSocialService;
     _musicService            = musicService;
     _workContext             = workContext;
     _friendService           = friendService;
     _pictureService          = pictureService;
     _mobSocialSettings       = mobSocialSettings;
     _mediaSettings           = mediaSettings;
     _genericAttributeService = genericAttributeService;
     _customerFollowService   = customerFollowService;
 }
 public BusinessPageApiController(IForumService forumService, ILocalizationService localizationService,
                                  IPictureService pictureService, ICountryService countryService,
                                  ICustomerService customerService, IDateTimeHelper dateTimeHelper,
                                  ForumSettings forumSettings, CustomerSettings customerSettings,
                                  MediaSettings mediaSettings, IBusinessPageService businessPageService,
                                  mobSocialSettings mobSocialSettings, IEventPageAttendanceService eventPageAttendanceService,
                                  IMobSocialService mobSocialService, IWorkContext workContext, IStateProvinceService stateProvinceService)
 {
     _localizationService        = localizationService;
     _pictureService             = pictureService;
     _countryService             = countryService;
     _customerService            = customerService;
     _dateTimeHelper             = dateTimeHelper;
     _forumSettings              = forumSettings;
     _customerSettings           = customerSettings;
     _mediaSettings              = mediaSettings;
     _businessPageService        = businessPageService;
     _eventPageAttendanceService = eventPageAttendanceService;
     _mobSocialSettings          = mobSocialSettings;
     _mobSocialService           = mobSocialService;
     _workContext          = workContext;
     _stateProvinceService = stateProvinceService;
 }
 public BusinessPageApiController(IForumService forumService, ILocalizationService localizationService,
     IPictureService pictureService, ICountryService countryService,
     ICustomerService customerService, IDateTimeHelper dateTimeHelper,
     ForumSettings forumSettings, CustomerSettings customerSettings,
     MediaSettings mediaSettings, IBusinessPageService businessPageService,
     mobSocialSettings mobSocialSettings, IEventPageAttendanceService eventPageAttendanceService,
     IMobSocialService mobSocialService, IWorkContext workContext, IStateProvinceService stateProvinceService)
 {
     _localizationService = localizationService;
     _pictureService = pictureService;
     _countryService = countryService;
     _customerService = customerService;
     _dateTimeHelper = dateTimeHelper;
     _forumSettings = forumSettings;
     _customerSettings = customerSettings;
     _mediaSettings = mediaSettings;
     _businessPageService = businessPageService;
     _eventPageAttendanceService = eventPageAttendanceService;
     _mobSocialSettings = mobSocialSettings;
     _mobSocialService = mobSocialService;
     _workContext = workContext;
     _stateProvinceService = stateProvinceService;
 }
 public EventPageController(IForumService forumService, ILocalizationService localizationService,
                            IPictureService pictureService, ICountryService countryService,
                            ICustomerService customerService, IDateTimeHelper dateTimeHelper,
                            ForumSettings forumSettings, CustomerSettings customerSettings,
                            MediaSettings mediaSettings, IEventPageService eventPageService,
                            mobSocialSettings mobSocialSettings, IEventPageAttendanceService eventPageAttendanceService,
                            IMobSocialService mobSocialService, IWorkContext workContext)
 {
     _forumService               = forumService;
     _localizationService        = localizationService;
     _pictureService             = pictureService;
     _countryService             = countryService;
     _customerService            = customerService;
     _dateTimeHelper             = dateTimeHelper;
     _forumSettings              = forumSettings;
     _customerSettings           = customerSettings;
     _mediaSettings              = mediaSettings;
     _eventPageService           = eventPageService;
     _eventPageAttendanceService = eventPageAttendanceService;
     _mobSocialSettings          = mobSocialSettings;
     _mobSocialService           = mobSocialService;
     _workContext = workContext;
 }
 public EventPageController(IForumService forumService, ILocalizationService localizationService,
     IPictureService pictureService, ICountryService countryService,
     ICustomerService customerService, IDateTimeHelper dateTimeHelper,
     ForumSettings forumSettings, CustomerSettings customerSettings,
     MediaSettings mediaSettings, IEventPageService eventPageService,
     mobSocialSettings mobSocialSettings, IEventPageAttendanceService eventPageAttendanceService,
     IMobSocialService mobSocialService, IWorkContext workContext)
 {
     _forumService = forumService;
     _localizationService = localizationService;
     _pictureService = pictureService;
     _countryService = countryService;
     _customerService = customerService;
     _dateTimeHelper = dateTimeHelper;
     _forumSettings = forumSettings;
     _customerSettings = customerSettings;
     _mediaSettings = mediaSettings;
     _eventPageService = eventPageService;
     _eventPageAttendanceService = eventPageAttendanceService;
     _mobSocialSettings = mobSocialSettings;
     _mobSocialService = mobSocialService;
     _workContext = workContext;
 }
Example #18
0
 public PaymentController(IWorkContext workContext,
                          IWebHelper webHelper,
                          IStoreContext storeContext,
                          ICustomerService customerService,
                          IProductService productService,
                          IGiftCardService giftCardService,
                          IOrderService orderService,
                          ICustomerPaymentMethodService paymentMethodService,
                          IMobSecurityService mobSecurityService,
                          IPaymentProcessingService paymentProcessingService,
                          IVideoBattleService videoBattleService,
                          IVoterPassService voterPassService,
                          ISponsorPassService sponsorPassService,
                          mobSocialSettings mobSocialSettings, IAddressAttributeService addressAttributeService, AddressSettings addressSettings, ILocalizationService localizationService, IAddressAttributeParser addressAttributeParser, ICountryService countryService, IStateProvinceService stateProvinceService)
 {
     _workContext              = workContext;
     _storeContext             = storeContext;
     _customerService          = customerService;
     _productService           = productService;
     _giftCardService          = giftCardService;
     _orderService             = orderService;
     _paymentMethodService     = paymentMethodService;
     _mobSecurityService       = mobSecurityService;
     _paymentProcessingService = paymentProcessingService;
     _videoBattleService       = videoBattleService;
     _voterPassService         = voterPassService;
     _sponsorPassService       = sponsorPassService;
     _mobSocialSettings        = mobSocialSettings;
     _addressAttributeService  = addressAttributeService;
     _addressSettings          = addressSettings;
     _localizationService      = localizationService;
     _addressAttributeParser   = addressAttributeParser;
     _countryService           = countryService;
     _stateProvinceService     = stateProvinceService;
     _webHelper = webHelper;
 }
Example #19
0
 public TimelineApiController(ITimelineService timelineService,
                              IWorkContext workContext,
                              ICustomerFollowService customerFollowService,
                              ICustomerService customerService,
                              IPictureService pictureService,
                              MediaSettings mediaSettings,
                              IDateTimeHelper dateTimeHelper,
                              mobSocialSettings mobSocialSettings,
                              IVideoBattleService videoBattleService,
                              ICustomerLikeService customerLikeService,
                              ICustomerCommentService customerCommentService)
 {
     _timelineService        = timelineService;
     _workContext            = workContext;
     _customerFollowService  = customerFollowService;
     _customerService        = customerService;
     _pictureService         = pictureService;
     _mediaSettings          = mediaSettings;
     _dateTimeHelper         = dateTimeHelper;
     _mobSocialSettings      = mobSocialSettings;
     _videoBattleService     = videoBattleService;
     _customerLikeService    = customerLikeService;
     _customerCommentService = customerCommentService;
 }
        public static string GetConsolidatedPrizesString(this VideoBattle Battle,
                                                         List <VideoBattlePrize> allPrizes,
                                                         int?WinnerPosition,
                                                         IWorkContext _workContext,
                                                         IProductService _productService,
                                                         ISponsorService _sponsorService,
                                                         IVoterPassService _voterPassService,
                                                         IVideoBattlePrizeService _videoBattlePrizeService,
                                                         IPriceFormatter _priceFormatter,
                                                         ISettingService _settingService,
                                                         IPaymentProcessingService _paymentProcessingService,
                                                         mobSocialSettings _mobSocialSettings)
        {
            var battleOwnerPrizes = allPrizes.Where(x => !x.IsSponsored && (!WinnerPosition.HasValue || x.WinnerPosition == WinnerPosition.Value));
            var sponsoredPrizes   = allPrizes.Where(x => x.IsSponsored && (!WinnerPosition.HasValue || x.WinnerPosition == WinnerPosition.Value));

            var totalPrizesAmountFixed =
                battleOwnerPrizes.Where(x => x.PrizeType == VideoBattlePrizeType.FixedAmount).Sum(x => x.PrizeAmount);

            var totalPrizesAmountPercentage = 0m;

            if (battleOwnerPrizes.Any(x => x.PrizeType == VideoBattlePrizeType.PercentageAmount))
            {
                var orders      = _voterPassService.GetAllVoterPassOrders(BattleType.Video, Battle.Id, PassStatus.Used);
                var orderSum    = orders.Sum(x => x.OrderTotal);
                var netOrderSum = _paymentProcessingService.GetNetAmountAfterPaymentProcessing(orderSum);

                var totalWinners = battleOwnerPrizes.Count();

                //total voting amount from percentage
                totalPrizesAmountPercentage = netOrderSum -
                                              totalWinners * netOrderSum * Battle.ParticipantPercentagePerVote / 100;
            }

            var sponsorships = _sponsorService.GetSponsorsGrouped(null, Battle.Id, BattleType.Video,
                                                                  SponsorshipStatus.Accepted);

            var sponsorshipAmount = sponsorships.Sum(x => x.SponsorshipAmount);

            //amount after payment processing
            var netSponsorshipAmount = _paymentProcessingService.GetNetAmountAfterPaymentProcessing(sponsorshipAmount);

            var siteOwnerShare = netSponsorshipAmount * _mobSocialSettings.SiteOwnerSponsorshipPercentage / 100;

            //it may be possible that battle host himself is sponsor, he won't be getting commissions for that :)
            var battleHostAsSponsorAmount =
                sponsorships.Where(x => x.CustomerId == Battle.ChallengerId).Sum(x => x.SponsorshipAmount);


            var battleHostShare = (netSponsorshipAmount - battleHostAsSponsorAmount) * _mobSocialSettings.BattleHostSponsorshipPercentage / 100;

            //amount available for winners
            var winnerPrizePool = netSponsorshipAmount - siteOwnerShare - battleHostShare;

            if (WinnerPosition.HasValue)
            {
                winnerPrizePool = PrizeDistributionHelper.GetPrizeDistributionPercentage(WinnerPosition.Value,
                                                                                         allPrizes.Count(x => !x.IsSponsored), _settingService) * winnerPrizePool;
            }

            var totalAmount = Math.Round(totalPrizesAmountFixed + totalPrizesAmountPercentage + winnerPrizePool);

            var totalPrizeString = totalAmount > 0 ? _priceFormatter.FormatPrice(totalAmount, true, _workContext.WorkingCurrency) : "";


            if (allPrizes.Any(
                    x => x.PrizeType == VideoBattlePrizeType.FixedProduct || x.PrizeType == VideoBattlePrizeType.Other))
            {
                if (!WinnerPosition.HasValue)
                {
                    totalPrizeString += "+";
                }
                else
                {
                    //now append each product as prize with it's name to the prize string
                    foreach (var prize in battleOwnerPrizes.Where(x => x.PrizeType == VideoBattlePrizeType.FixedProduct || x.PrizeType == VideoBattlePrizeType.Other))
                    {
                        if (prize.PrizeType == VideoBattlePrizeType.FixedProduct)
                        {
                            var product = _productService.GetProductById(prize.PrizeProductId);
                            if (product != null)
                            {
                                totalPrizeString += (totalPrizeString != "" ? " + " : "") + product.Name;
                            }
                            else
                            {
                                totalPrizeString += (totalPrizeString != "" ? " + " : "") + prize.PrizeProductId;
                            }
                        }
                        else
                        {
                            totalPrizeString += (totalPrizeString != "" ? " + " : "") + prize.PrizeOther;
                        }
                    }
                    //and sponsored products
                    foreach (var prize in sponsoredPrizes.Where(x => x.PrizeType == VideoBattlePrizeType.Other))
                    {
                        totalPrizeString += (totalPrizeString != "" ? " + " : "") + prize.PrizeOther + "*";
                    }
                }
            }

            return(totalPrizeString);
        }
Example #21
0
 public SkateMoveController(IMobSocialService socialNetworkService, mobSocialSettings socialNetworkSettings)
 {
     _socialNetworkService  = socialNetworkService;
     _socialNetworkSettings = socialNetworkSettings;
 }
 public ArtistPageAPIService(mobSocialSettings mobSocialSettings, ICacheManager cacheManager)
 {
     _mobsocialSettings = mobSocialSettings;
     _cacheManager      = cacheManager;
 }