Exemple #1
0
        public static async void obrisiKredit(string p)
        {
            try
            {
                var lista    = App.MobileService.GetTable <TabelaKredit>();
                var listatmp = await lista.ToListAsync();

                TabelaKredit tk = listatmp.Find(x => x.Id.Equals(p));
                await lista.DeleteAsync(tk);
            }
            catch (Exception e)
            {
                Debug.WriteLine("Greska");
                throw;
            }
        }
Exemple #2
0
        public static async void registrujKredit(double ostaloVratiti, string idUposlenika, double iznosKamate, string idKlijenta, DateTime dd, DateTime dv)
        {
            IMobileServiceTable <TabelaKredit> Zahtjevi = App.MobileService.GetTable <TabelaKredit>();
            TabelaKredit tkr = new TabelaKredit();

            tkr.VratitiNovca  = ostaloVratiti;
            tkr.IdUposlenika  = idUposlenika;
            tkr.IznosKamate   = iznosKamate;
            tkr.IdKlijenta    = idKlijenta;
            tkr.DatumDizanja  = dd;
            tkr.DatumVracanja = dv;
            try
            {
                await Zahtjevi.InsertAsync(tkr);
            }
            catch (Exception e)
            {
                throw;
            }
        }