예제 #1
0
        private void Bill_btnRekeningOverzicht_Click(object sender, EventArgs e)
        {
            HideAllPanels();

            Bill_lvBillOverview.Show();

            Bill bills = bill_service.GetBillByTableId(tableId);

            if (bills.Payed == false)
            {
                for (int i = 0; i < bills.Orders.Count; i++)
                {
                    foreach (Dish dish in bills.Orders[i].Dishes)
                    {
                        items      = dish.Name;
                        totalprice = totalprice + dish.Price;

                        ListViewItem li = new ListViewItem(items);
                        li.SubItems.Add(dish.Price.ToString("€0.00"));
                        Bill_lvBillOverview.Items.Add(li);
                    }

                    foreach (Drink drink in bills.Orders[i].Drinks)
                    {
                        items      = drink.Name;
                        totalprice = totalprice + drink.Price;

                        ListViewItem li = new ListViewItem(items);
                        li.SubItems.Add(drink.Price.ToString("€0.00"));
                        Bill_lvBillOverview.Items.Add(li);
                    }
                }
                columnheader       = new ColumnHeader();
                columnheader.Text  = "Item";
                columnheader.Width = 400;
                Bill_lvBillOverview.Columns.Add(columnheader);

                columnheader       = new ColumnHeader();
                columnheader.Text  = "Prijs";
                columnheader.Width = 100;
                Bill_lvBillOverview.Columns.Add(columnheader);

                Bill_lblTotalPrice.Text = totalprice.ToString("€0.00");

                Bill_lblTotalPrice.Show();
                Bill_lblBtw.Show();
                Bill_lblBtwLinks.Show();
                Bill_btnFooi.Show();
                Bill_btnKiesBetaalmethode.Show();
            }
            else
            {
                Bill_lblBetaald.Show();
            }
        }
예제 #2
0
 private void HideAllPanels()
 {
     Bill_lblBtw.Hide();
     Bill_btnBillOverview.Hide();
     Bill_btnKiesBetaalmethode.Hide();
     Bill_btnFooi.Hide();
     Bill_lblRekeningNietBeschikbaar.Hide();
     Bill_lvTables.Hide();
     Bill_pnlAfrekenen.Hide();
     Bill_pnlBetaalMethode.Hide();
     Bill_rbCash.Hide();
     Bill_rbMastercard.Hide();
     Bill_rbPaypal.Hide();
     Bill_rbVisa.Hide();
     Bill_btnPay.Hide();
     Bill_pnlFooi.Hide();
     Bill_lblTotalPrice.Hide();
     Bill_lblBetaald.Hide();
     Bill_lblBtwLinks.Hide();
 }