コード例 #1
0
ファイル: Bazzza.cs プロジェクト: ooad-2017-2018/Grupa4-NVM
        public static async void obrisiZahtjev(string p)
        {
            try
            {
                var lista    = App.MobileService.GetTable <TabelaZahtjev>();
                var listatmp = await lista.ToListAsync();

                TabelaZahtjev tk = listatmp.Find(x => x.Id.Equals(p));
                await lista.DeleteAsync(tk);
            }
            catch (Exception e)
            {
                Debug.WriteLine("Greska");
                throw;
            }
        }
コード例 #2
0
ファイル: Bazzza.cs プロジェクト: ooad-2017-2018/Grupa4-NVM
        public static async void registrujZahtjev(double glavnica, string valuta, int brRata, string idKlijenta)
        {
            IMobileServiceTable <TabelaZahtjev> Zahtjevi = App.MobileService.GetTable <TabelaZahtjev>();
            TabelaZahtjev tz = new TabelaZahtjev();

            tz.Glavnica   = glavnica;
            tz.Valuta     = valuta;
            tz.BrojRata   = brRata;
            tz.IdKlijenta = idKlijenta;

            try
            {
                await Zahtjevi.InsertAsync(tz);
            }
            catch (Exception e)
            {
                throw;
            }
        }