public NarudzbeNodeStore(bool loadFromDB) : base(typeof(NarudzbeNode))
 {
     if (loadFromDB)
     {
         this.AddList(DBNarudzba.GetNarudzbe());
     }
 }
        public void DodajNarudzbu(string oznakaStola)
        {
            Narudzba n = new Narudzba("0", DateTime.Now, Narudzba.OznakaPotvrde.Nepotvrdeno, StoloviPresenter.stoloviList.Find(s => s.Oznaka == oznakaStola));

            DBNarudzba.SaveNarudzba(ref n);
            this.Add(n);
        }
Exemple #3
0
        public void Zakljuci()
        {
            narudzba.Oznaka = Narudzba.OznakaPotvrde.Potvrdeno;
            DBNarudzba.UpdateNarudzba(narudzba);

            stavkeNarudzbeNodeStore.Clear();
            MainWindow.stavkeChanged();
        }
Exemple #4
0
        public void Update(int stol)
        {
            narudzba.StolNarudzbe = StoloviPresenter.stoloviList[stol];
            OznakaStola           = narudzba.StolNarudzbe.Oznaka;

            foreach (StavkaNarudzbeNode ns in stavkeNarudzbeNodeStore)
            {
                ns.OznakaStola = narudzba.StolNarudzbe.Oznaka;
            }

            DBNarudzba.UpdateNarudzba(narudzba);
        }
 public void Refresh()
 {
     Clear();
     AddList(DBNarudzba.GetNarudzbe());
 }
 public void IzbrisiNarudzbu(NarudzbeNode n)
 {
     this.RemoveNode(n);
     DBNarudzba.DeleteNarudzba(n.narudzba);
     MainWindow.stavkeChanged();
 }