Пример #1
0
 public void SetTableColors()
 {
     tables = tafelService.getTables();
     for (int i = 0; i < tables.Count; i++)
     {
         orders = tafelService.CheckOrderStatus(i + 1);
         if (tables[i].bezet == false)
         {
             btnList[i].BackColor = Color.Green;
         }
         else if (tables[i].bezet == true || (orders == "bezig" || orders == "Bezig"))
         {
             btnList[i].BackColor = Color.Orange;
         }
         else if (tables[i].bezet == true || orders == "Gereed")
         {
             btnList[i].BackColor = Color.Red;
         }
         else if (orders == "" || orders == " ")
         {
             tafelService.EditStatus(i, false);
             btnList[i].BackColor = Color.Green;
         }
     }
 }
Пример #2
0
 public void Occupied(int tafelnummer)
 {
     if (table_service.Occupied(tafelnummer) == true)
     {
         this.Close();
         OrderActionForm orderForm = new OrderActionForm(werknemer, tafelnummer);
         orderForm.Show();
     }
     else
     {
         DialogResult dialogResult = MessageBox.Show("Wil je deze tafel op bezet zetten?", "Bezet zetten", MessageBoxButtons.YesNo);
         if (dialogResult == DialogResult.Yes)
         {
             table_service.EditStatus(tafelnummer, true);
             this.Close();
             OrderActionForm orderForm = new OrderActionForm(werknemer, tafelnummer);
             orderForm.Show();
         }
     }
 }
Пример #3
0
        private void btnBetaald_Click(object sender, EventArgs e)
        {
            TableForm form = new TableForm(werknemer);
            //string paymenttype;
            string comment        = txtboxOpmerking.Text;
            string amountWithBtwS = bon.totaalprijs.ToString().Replace(',', '.');
            string tipS           = bon.fooi.ToString().Replace(',', '.');

            //bon.bestelling_ID

            //paymenttype = PaymentType();

            //if(paymenttype != "")
            //{
            orderService.Paid(tafel_ID, amountWithBtwS, tipS, comment, bon.bestelling_ID);
            tafelService.EditStatus(tafel_ID, false);
            MessageBox.Show("De bestelling is betaald!");
            this.Close();
            form.Show();
            //}
        }