Exemple #1
0
        public async Task OdbijPoziv(int id)
        {
            PozivNaEventPatchRequest patchRequest = new PozivNaEventPatchRequest {
                Id = id, IsOdbijen = true
            };

            PozivNaEvent result = await _pozivNaEventService.UpdateAttribute <PozivNaEvent>(patchRequest);

            if (result != null && result != default(PozivNaEvent))
            {
                await GetPrihvaceniPozivi();
            }
        }
Exemple #2
0
        public async void PozoviPrijatelja(int eventId, int prijateljId)
        {
            PozivNaEventInsertRequest request = new PozivNaEventInsertRequest
            {
                EventId             = eventId,
                KorisnikPozivalacId = Global.Korisnik.Id,
                KorisnikPozvaniId   = prijateljId,
                IsOdbijen           = false,
                IsPrihvacen         = false
            };

            PozivNaEvent result = await _pozivNaEventService.Insert <PozivNaEvent>(request);

            if (result != null || result != default(PozivNaEvent))
            {
                await Init();
            }
        }
Exemple #3
0
        public async Task PrihvatiPoziv(int id)
        {
            PozivNaEventPatchRequest patchRequest = new PozivNaEventPatchRequest {
                Id = id, IsPrihvacen = true
            };

            PozivNaEvent result = await _pozivNaEventService.UpdateAttribute <PozivNaEvent>(patchRequest);

            if (result != null && result != default(PozivNaEvent))
            {
                if (request != null && request.NoviPozivi && request.OdbijeniPozivi)
                {
                    await GetOdbijeniPozivi();
                }
                if (request != null && request.NoviPozivi && request.NeodgovoreniPozivi)
                {
                    await Init();
                }
            }
        }
Exemple #4
0
        public async void ObrisiPoziv(int id)
        {
            if (id > 0)
            {
                PozivNaEvent result = await _pozivNaEventService.Delete <PozivNaEvent>(id);

                if (result != null && result != default(PozivNaEvent))
                {
                    if (request != null && request.NeodgovoreniPozivi)
                    {
                        await Init();
                    }
                    if (request != null && request.OdbijeniPozivi)
                    {
                        await GetOdbijeniPozivi();
                    }
                    if (request != null && request.PrihvaceniPozivi)
                    {
                        await GetPrihvaceniPozivi();
                    }
                }
            }
        }