private void ApplySwipe(SwipeSide swipeSide) { StopAllCoroutines(); int offerDataId = _assetSpecialOffers.OfferDatas.FindIndex(data => data == _currentOfferData); if (swipeSide == SwipeSide.Right) { if (offerDataId == _assetSpecialOffers.OfferDatas.Count - 1) { offerDataId = 0; } else { offerDataId++; } } else { if (offerDataId == 0) { offerDataId = _assetSpecialOffers.OfferDatas.Count - 1; } else { offerDataId--; } } _currentOfferData = _assetSpecialOffers.OfferDatas[offerDataId]; ApplyNewOffer(); }
private async void Partner_offer_layout_ItemTapped(object sender, ItemTappedEventArgs e) { OfferData selected = (OfferData)partner_offer_layout.SelectedItem; var clickedPage = new OfferActivity { BindingContext = selected }; await Navigation.PushAsync(clickedPage, true); }
public Product() { this.parentCategoryPathsField = new List <ParentCategory>(); this.promotionsField = new List <Promotion>(); this.offerDataField = new OfferData(); this.mediaField = new List <MediaEntry>(); this.imagesField = new List <MediaEntry>(); this.urlsField = new List <Entry>(); this.entityGroupsField = new List <EntityGroup>(); this.attributeGroupsField = new List <AttributeGroup>(); this.trackListsField = new List <TrackList>(); }
public void OnSpecialOfferButtonPressed(OfferData offerData) { Mediator.Instance.SoundManager.PlaySound(SoundType.Click); if (offerData.SpecialOfferType == SpecialOfferType.Subscription) { OnSubscriptionPopupOpen(); } else { Mediator.Instance.ShopIAPManager.BuyProduct(offerData.ShopProductName); } }
public DashboardOffer GetDashboardOffers(OfferSearchRequest request) { var dashboardOfferList = new DashboardOffer(); var query = _context.Offer.AsQueryable(); if (!string.IsNullOrWhiteSpace(request?.AppUserId)) { query = query.Where(x => x.AppUserId == request.AppUserId); } var list = query .Include(a => a.Client) .Include(a => a.Status) .Include(a => a.Currency) .OrderByDescending(a => a.OfferId) .ToList(); foreach (var item in list) { var newOffer = new OfferData { StatusId = item.StatusId, ClientId = item.ClientId, OfferId = item.OfferId, Client = item.Client.FirstName + " " + item.Client.LastName, OfferName = item.Name, Status = item.Status.Name, TotalPrice = item.TotalPrice.ToString() + " " + item.Currency.Tag }; if ((item.StatusId == 1 || item.StatusId == 2 || item.StatusId == 4) && dashboardOfferList.OffersList.Count < 5) { dashboardOfferList.OffersList.Add(newOffer); } else if (item.StatusId == 3 && dashboardOfferList.ActiveProjectsList.Count < 5) { dashboardOfferList.ActiveProjectsList.Add(newOffer); } else if (dashboardOfferList.FinishedProjectsList.Count < 5 && item.StatusId == 5) { dashboardOfferList.FinishedProjectsList.Add(newOffer); } } checkIfDeadlineExceeded(); return(dashboardOfferList); }
private IEnumerator ChangeSpecialOfferTimer() { while (true) { foreach (OfferData offerData in _assetSpecialOffers.OfferDatas) { if (offerData.SpecialOfferType == SpecialOfferType.Subscription && Mediator.Instance.CustomStatisticsManager.IsSubscriptionPurchased) { continue; } _currentOfferData = offerData; ApplyNewOffer(); yield return(new WaitForSeconds(_changeOfferCooldown)); } } }
public string HttpPost(string URL, int offerId, string storeNames) { try { IRestServiceHelper restservice = CurrentRequest.Resolver.Resolve <IRestServiceHelper>(); OfferData ofd = new OfferData() { offerId = offerId, storeNames = storeNames.Split(',') }; var PostData = Newtonsoft.Json.JsonConvert.SerializeObject(ofd); KeyValuePair <String, String> response = restservice.CallService <String>(RESTServiceList.PromotionBrokerService, URL, 1, System.Net.Http.HttpMethod.Post, PostData, false); return(response.Key); } catch (Exception ex) { return(ex.Message); } }
public Task <OfferData> Update(OfferData offerData, CancellationToken cancellationToken) { var existingOffer = Offers.FirstOrDefault(x => x.Id == offerData.Id); if (existingOffer == null) { return(AddOffer(offerData, cancellationToken)); } existingOffer.JobTitle = offerData.JobTitle; existingOffer.EmployerName = offerData.EmployerName; existingOffer.EmployerAddressCity = offerData.EmployerAddressCity; existingOffer.EmployerAddressCountry = offerData.EmployerAddressCountry; existingOffer.ExpirationDateUtc = offerData.ExpirationDateUtc; existingOffer.LocationCity = offerData.LocationCity; existingOffer.LocationCountry = offerData.LocationCountry; existingOffer.CandidateIds = offerData.CandidateIds; return(Task.FromResult(offerData)); }
public Offer(OfferData offerData) { OfferId = offerData.Id; JobTitle = offerData.JobTitle; Employer = new Employer() { Name = offerData.EmployerName, Address = new GeoLocation() { CountryName = offerData.EmployerAddressCountry, CityName = offerData.EmployerAddressCity } }; CreationDateUtc = offerData.CreationDateUtc; ExpirationDateUtc = offerData.ExpirationDateUtc; Location = new GeoLocation() { CityName = offerData.LocationCity, CountryName = offerData.LocationCountry }; Salary = new Salary() { Range = offerData.Salary }; ApplicationsNumber = offerData.CandidateIds.Count; }
public ProductOffers() { this.offerDataField = new OfferData(); }
public Product() { this.parentCategoryPathsField = new List<ParentCategory>(); this.promotionsField = new List<Promotion>(); this.offerDataField = new OfferData(); this.mediaField = new List<MediaEntry>(); this.imagesField = new List<MediaEntry>(); this.urlsField = new List<Entry>(); this.entityGroupsField = new List<EntityGroup>(); this.attributeGroupsField = new List<AttributeGroup>(); this.trackListsField = new List<TrackList>(); }
public Task <OfferData> AddOffer(OfferData offerData, CancellationToken cancellationToken) { offerData.Id = Guid.NewGuid(); Offers.Add(offerData); return(Task.FromResult(offerData)); }
private void GetOfferDetails() { offer = (OfferData)this.BindingContext; GetOfferPartner(); GetOfferCategory(); }
/// <summary> /// Creates the data for the specified row. /// </summary> /// <param name="Row">The row.</param> internal Data Create(Row Row) { Data Data; switch (this.Index) { case 0: { Data = new BuildingData(Row, this); break; } case 1: { Data = new LocaleData(Row, this); break; } case 2: { Data = new ResourceData(Row, this); break; } case 3: { Data = new CharacterData(Row, this); break; } case 6: { Data = new BuildingClassData(Row, this); break; } case 7: { Data = new ObstacleData(Row, this); break; } case 8: { Data = new EffectData(Row, this); break; } case 9: { Data = new ParticleEmitterData(Row, this); break; } case 10: { Data = new ExperienceLevelData(Row, this); break; } case 11: { Data = new TrapData(Row, this); break; } case 12: { Data = new AllianceBadgeData(Row, this); break; } case 13: { Data = new GlobalData(Row, this); break; } case 14: { Data = new TownhallLevelData(Row, this); break; } case 15: { Data = new PrototypeData(Row, this); break; } case 16: { Data = new NpcData(Row, this); break; } case 17: { Data = new DecoData(Row, this); break; } case 18: { Data = new ResourcePackData(Row, this); break; } case 20: { Data = new MissionData(Row, this); break; } case 21: { Data = new BillingPackageData(Row, this); break; } case 22: { Data = new AchievementData(Row, this); break; } case 25: { Data = new SpellData(Row, this); break; } case 26: { Data = new HintData(Row, this); break; } case 27: { Data = new LandingShipData(Row, this); break; } case 28: { Data = new ArtifactData(Row, this); break; } case 29: { Data = new ArtifactBonusData(Row, this); break; } case 30: { Data = new DeepseaParameterData(Row, this); break; } case 31: { Data = new ExplorationCostData(Row, this); break; } case 34: { Data = new ResourceShipData(Row, this); break; } case 35: { Data = new LootBoxData(Row, this); break; } case 36: { Data = new LiberatedIncomeData(Row, this); break; } case 37: { Data = new RegionData(Row, this); break; } case 38: { Data = new DefenseRewardData(Row, this); break; } case 39: { Data = new LocatorData(Row, this); break; } case 40: { Data = new EventData(Row, this); break; } case 41: { Data = new FootstepData(Row, this); break; } case 42: { Data = new PersistentEventRewardData(Row, this); break; } case 43: { Data = new CommunityLinkData(Row, this); break; } case 44: { Data = new ShieldData(Row, this); break; } case 45: { Data = new AbTestData(Row, this); break; } case 46: { Data = new LetterData(Row, this); break; } case 47: { Data = new RankData(Row, this); break; } case 48: { Data = new CountryData(Row, this); break; } case 51: { Data = new BoomboxData(Row, this); break; } case 52: { Data = new HeroData(Row, this); break; } case 53: { Data = new HeroAbilityData(Row, this); break; } case 54: { Data = new OfferData(Row, this); break; } case 55: { Data = new DeepLinkData(Row, this); break; } case 56: { Data = new SectorData(Row, this); break; } case 57: { Data = new SectorBonusData(Row, this); break; } default: { Data = new Data(Row, this); break; } } return(Data); }