public static async void obrisiManagera(string p) { try { var lista = App.MobileService.GetTable <TabelaManager>(); var listatmp = await lista.ToListAsync(); TabelaManager tk = listatmp.Find(x => x.username.Equals(p)); await lista.DeleteAsync(tk); } catch (Exception e) { Debug.WriteLine("Greska"); throw; } }
public static async void registrujManagera(string jmbg, string ime, string prezime, string adresa, string brTel, string un, string pass) { IMobileServiceTable <TabelaManager> Manageri = App.MobileService.GetTable <TabelaManager>(); TabelaManager tm = new TabelaManager(); tm.id = jmbg; tm.ime = ime; tm.prezime = prezime; tm.adresa = adresa; tm.brTel = brTel; tm.username = un; tm.password = pass; try { await Manageri.InsertAsync(tm); } catch (Exception e) { throw; } }