예제 #1
0
        public OfferDataStore()
        {
            items = new List <Item>();
            var current = Connectivity.NetworkAccess;

            if (current == NetworkAccess.Internet)
            {
                _offerRepository = new OfferRepository();
                var offers = _offerRepository.GetOffers(1);

                foreach (var offer in offers)
                {
                    items.Add(new Item
                    {
                        Id          = offer.Id.ToString(),
                        Text        = offer.Name,
                        Description = offer.Description,
                        Color       = offer.ColorCode,
                        IsActive    = false
                    });
                }
            }
        }
예제 #2
0
 public IEnumerable <Offer> Get(string productName)
 {
     return(OfferRepository.GetOffers(productName));
 }