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(); } }
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(); } }
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(); } } }
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(); } } } }