Beispiel #1
0
        public void WriteBestellingIncrement(int bestellingId, int medewerkerId, Tafel tafel)
        {
            BestellingDAO bDAO       = new BestellingDAO();
            Bestelling    bestelling = new Bestelling(bestellingId, medewerkerId, tafel.Nummer, DateTime.Now);

            bDAO.WriteBesteling(bestelling);
        }
Beispiel #2
0
        public Tafel HaalTafelOp()
        {
            // moet eigenlijk data ophalen van een label van juan
            Tafel t = new Tafel(10, true);

            return(t);
        }
        public void StuurBestelItemNaarDatabase(List <BestelItem> lijstBestelItem, Tafel tafel)
        {
            DAL.Bestelling_DAO dalBestelling = new Bestelling_DAO();
            int orderId = dalBestelling.GetIdOfUncompletedOrder(tafel.Id);

            foreach (BestelItem item in lijstBestelItem)
            {
                dalBestelling.ZetBestelItemsInDatabase(item, orderId);
            }
        }
Beispiel #4
0
        public void WriteBestelling(Medewerker m, Tafel t)
        {
            BestellingDAO bDAO = new BestellingDAO();

            Bestelling bestelling = new Bestelling(0, m.Id, t.Nummer, DateTime.Now);


            bDAO.WriteBesteling(bestelling);
            int bestellingId = bDAO.GetBestellingIdByTijd(bestelling.Tijd);
        }
        public bool ControleerOfTafelAlBestellingHeeft(Tafel tafel)
        {
            Bestelling_DAO dalBestelling = new Bestelling_DAO();
            int            aantal        = dalBestelling.ControleerOfTafelAlBestellingHeeft(tafel);

            if (aantal >= 1)
            {
                return(true);
            }
            return(false);
        }
        public void VeranderTafelStatus(Tafel tafel, int status)
        {
            try
            {
                TafelOverzichtDaO.Instance.VeranderTafelStatus(tafel, status);
            }

            catch (Exceptions.NetworkProblemException)
            {
                throw new Exceptions.NetworkProblemException();
            }
        }
Beispiel #7
0
        public Bestelling WriteBestelling(int medewerkerId, Tafel t)
        {
            BestellingDAO bDAO = new BestellingDAO();

            Bestelling bestelling = new Bestelling(0, medewerkerId, t.Nummer, DateTime.Now);

            bDAO.WriteBesteling(bestelling);


            bestelling.Id = bDAO.GetBestellingIdByTijd(bestelling.Tijd);

            return(bestelling);
        }
        public bool TafelStatus(int id)
        {
            Tafel tafel = tafelDAL.GetForId(id); // Nieuwe instantie van tafel vullen met juiste ID uit database

            if (tafel.Bezet)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public void MaakGroepKlantenEnRekeningAan(Tafel tafel, Werknemer werknemer, int aantalPersonen)
        {
            //maak een rekening aan
            DAL.TafelOverzichtDaO.Instance.MaakRekeningAan();

            int hoogsteRekeningsId = DAL.TafelOverzichtDaO.Instance.VindHoogsteRekeningsId();

            // zet groepsid op hoogste rekeningsid
            // zet rekeningsid goed
            //check werknemerId
            //check tafelId
            //insert groep klanten sql
            DAL.TafelOverzichtDaO.Instance.MaakGroepKlantenAan(werknemer, tafel, aantalPersonen, hoogsteRekeningsId);
        }
        public int GetBestellingIdByTafelNummer(Tafel tafel)
        {
            Bestelling_DAO dalBestelling = new Bestelling_DAO();

            List <Bestelling> lijstBestellingen = dalBestelling.GetAll();

            foreach (Bestelling bestelling in lijstBestellingen)
            {
                if (bestelling.Tafel.Id == tafel.Id)
                {
                    return(bestelling.Id);
                }
            }
            return(0);
        }
Beispiel #11
0
 public bool checkTafelStatus(int tafelId)
 {
     t = tDAO.readTafel(tafelId);
     return(t.IsBezet);
 }
Beispiel #12
0
 public Tafel getTafel(int tafelId)
 {
     t = tDAO.readTafel(tafelId);
     return(t);
 }