private void GiveItem()
        {
            Count--;
            db = new TicketsContext();
            db.Lexturys.Load();
            Lextury ticket = new Lextury();

            ticket       = db.Lexturys.Find(Id);
            ticket.Count = Count;
            db.SaveChanges();
            db.Dispose();
        }
Esempio n. 2
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     db.Dispose();
 }