public JuzerViewModel(Juzer Juzer, int KolcsonzesekSzama, int Tartozas, bool LejartKolcsonzesVane) { this.Juzer = Juzer; this.KolcsonzesekSzama = KolcsonzesekSzama; this.Tartozas = Tartozas; this.LejartKolcsonzesVane = LejartKolcsonzesVane; }
public void saveJuzer(Juzer Juzer) { if (Juzer.ID == 0) { db.insertItem(Juzer); JuzerLista.Add(Juzer); } else { db.updateItem(Juzer); } }
public JuzerLap(Juzer juzer) { InitializeComponent(); _juzer = juzer; nevEntry.Text = _juzer.Nev; deleteTBI.Clicked += DeleteTBI_Clicked; saveTBI.Clicked += SaveTBI_Clicked; cancelTBI.Clicked += CancelTBI_Clicked; }
public int getKolcsonzesekSzama(Juzer juzer) { List <CsakAzSqliteMiattKell> tmp = dbkapcsi.Query <CsakAzSqliteMiattKell>(@" SELECT count(*) as ertek FROM Kolcsonzes WHERE Kolcsonzes.JuzerID = ? AND Kolcsonzes.Visszahozta = ?", juzer.ID, DateTime.MinValue); return(tmp[0].ertek); }
public int getTartozas(Juzer juzer) { decimal lq = (from k in KolcsonzesLista join c in CuccLista on k.CuccID equals c.ID where k.JuzerID == juzer.ID && k.Visszahozta == DateTime.MinValue select new { z = (DateTime.Now - k.Mettol).Days * c.Napidij }) .Sum(x => x.z); return((int)lq); }
public bool vanEKolcsonzese(Juzer Juzer) { if (Juzer.ID == 0) { return(false); } foreach (Kolcsonzes k in KolcsonzesLista) { if (k.JuzerID == Juzer.ID && k.Visszahozta == DateTime.MinValue) { return(true); } } return(false); }
public void visszahoztaCucc(Juzer juzer, Cucc cucc) { dbkapcsi.Execute( @"UPDATE Kolcsonzes SET Visszahozta = ? WHERE JuzerID = ? AND CuccID = ? AND Visszahozta = ? ", DateTime.Now, juzer.ID, cucc.ID, DateTime.MinValue ); }
public List <Cucc> getJuzerKolcsonzesek(Juzer juzer) { List <Cucc> ret = new List <Cucc>(); foreach (Kolcsonzes k in KolcsonzesLista) { if (k.JuzerID == juzer.ID && k.Visszahozta == DateTime.MinValue) { foreach (Cucc c in CuccLista) { if (c.ID == k.CuccID) { ret.Add(c); break; } } } } return(ret); }
public void visszahoztaCucc(Juzer juzer, Cucc cucc) { db.visszahoztaCucc(juzer, cucc); KolcsonzesLista = new ObservableCollection <Kolcsonzes>(db.getList <Kolcsonzes>()); }
public void deleteJuzer(Juzer Juzer) { db.deleteItem(Juzer); JuzerLista.Remove(Juzer); }