void UpdateCardList() { foreach (Person p in JetonCtrl.GetAllPersons()) { cardList.AppendValues(p, p.Name); } }
public ArtikelChooser() { this.Build(); JetonCtrl.CreateArtikel(); _artikel = JetonDb.JetonCtrl.GetVisibleArtikel(); Update(); }
void OnCardAdd(object sender, System.EventArgs e) { TreeIter iter; Person p = JetonCtrl.CreatePerson(); p.Name = "Neuer Laborant"; iter = cardList.AppendValues(p, p.Name); cardListView.Selection.SelectIter(iter); }
public static void Main(string[] args) { JetonCtrl.Open(); Application.Init(); MainWindow win = new MainWindow(); win.Show(); Application.Run(); JetonCtrl.Close(); }
public static void Main(string[] args) { JetonCtrl.Open(); // Open Database Artikel mate = JetonCtrl.CreateArtikel(); mate.Name = "Mate"; mate.Bestand = 13; mate.Preis = 1.50m; mate.ProKasten = 20; Artikel fritz = JetonCtrl.CreateArtikel(); fritz.Name = "Fritz"; fritz.Bestand = 11; fritz.Preis = 1.00m; fritz.ProKasten = 24; JetonCtrl.SaveArtikel(fritz); Artikel hermann = JetonCtrl.CreateArtikel(); hermann.Name = "Hermann"; hermann.Bestand = 4; hermann.Preis = 1.00m; hermann.ProKasten = 24; JetonCtrl.SaveArtikel(hermann); Artikel schoka = JetonCtrl.CreateArtikel(); schoka.Name = "SchokaKola"; schoka.Bestand = 5; schoka.Preis = 2.50m; schoka.ProKasten = 12; JetonCtrl.SaveArtikel(schoka); Application.Init(); MainWindow win = new MainWindow(); win.Show(); Application.Run(); JetonCtrl.Close(); }
void Gui2Db() { if (currentPerson == null) { return; } currentPerson.Name = cardNameEntry.Text; currentPerson.Deposit = decimal.Parse(cardCreditEntry.Text); currentPerson.Escrow = decimal.Parse(cardEscrowEntry.Text); currentPerson.Permissions.Set(Perm.Laborant, cardPermLaborant.Active); currentPerson.Permissions.Set(Perm.Treuhaender, cardPermEscrow.Active); currentPerson.Permissions.Set(Perm.CardCreator, cardPermCreator.Active); currentPerson.Permissions.Set(Perm.God, cardPermGod.Active); JetonCtrl.SavePerson(currentPerson); changed = false; undoBtn.Sensitive = false; saveBtn.Sensitive = false; }