public async Task Init()
        {
            if (ZanrList.Count == 0)
            {
                var zanrList = await _zanrService.Get <List <Zanr> >(null);

                foreach (var zanr in zanrList)
                {
                    ZanrList.Add(zanr);
                }
            }

            PredstavaSearchRequest search = new PredstavaSearchRequest();

            if (SelectedZanr != null)
            {
                search.ZanrId = SelectedZanr.ZanrID;
            }

            var list = await _predstaveService.Get <IEnumerable <Predstava> >(search);

            PredstavaList.Clear();
            foreach (var predstava in list)
            {
                PredstavaList.Add(predstava);
            }
        }
        public async Task PrikazPredstave()
        {
            var list = await _service.Get <IEnumerable <Predstava> >(null);

            PredstavaList.Clear();
            foreach (var predstava in list)
            {
                PredstavaList.Add(predstava);
            }
        }
Ejemplo n.º 3
0
        public async Task Init2()
        {
            var list = await _apiServicePedstava.Get <List <Predstava> >(null);

            PredstavaList.Clear();
            foreach (var g in list)
            {
                PredstavaList.Add(g);
            }
        }
        public async Task Init()
        {
            var list = await _predstava.Get <List <Predstava> >(null);

            PredstavaList.Clear();
            foreach (var z in list)
            {
                PredstavaList.Add(z);
            }
        }
        public async Task Init()
        {
            Kupac        kupac    = new Kupac();
            var          username = APIService.Username;
            List <Kupac> lista    = await _apiServiceKupci.Get <List <Kupac> >(null);

            foreach (var k in lista)
            {
                if (k.KorisnickoIme == username)
                {
                    kupac = k;
                    break;
                }
            }

            var list = await _apiServicePreporuke.GetById <List <Predstava> >(kupac.KupacId);

            PredstavaList.Clear();

            foreach (var item in list)
            {
                PredstavaList.Add(item);
            }
        }