private void btn_Bar_Click(object sender, EventArgs e)
        {
            Login_Service service = Login_Service.GetLoginService();

            if (service.CurrentEmployee.FunctionID == 3 || service.CurrentEmployee.FunctionID == 4 || service.CurrentEmployee.FunctionID == 5)
            {
                KeukenBar kb = KeukenBar.GetKeukenBar();
                kb.Show();
                kb.ReloadPage("Bar");
                this.Hide();
            }
            else
            {
                MessageBox.Show("Je hebt geen toestemming tot het 'Bar' scherm.", "Foutmelding", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btn_Cancel_Click(object sender, EventArgs e)
        {
            //Set this order to cancelled
            KitchenBar_Service service = KitchenBar_Service.GetBarService();

            service.UpdatebarOrder(OrderID, btn_Cancel.Text);
            if (MenuItems[0].MenuTypeID == 3 || MenuItems[0].MenuTypeID == 4)
            {
                KeukenBar kb = KeukenBar.GetKeukenBar();
                kb.ReloadPage("Keuken");
            }
            if (MenuItems[0].MenuTypeID == 1 || MenuItems[0].MenuTypeID == 2)
            {
                KeukenBar kb = KeukenBar.GetKeukenBar();
                kb.ReloadPage("Bar");
            }
            MessageBox.Show("Bestelling geannuleerd.", "Gelukt!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }
Exemple #3
0
        private void btn_Confirm_Click(object sender, EventArgs e)
        {
            //Set this order to done
            KitchenBar_Service service = KitchenBar_Service.GetBarService();

            service.UpdatebarOrder(OrderID, btn_Confirm.Text);
            if (this.MenuItems[0].MenuTypeID == 3 || this.MenuItems[0].MenuTypeID == 4)
            {
                KeukenBar kb = KeukenBar.GetKeukenBar();
                kb.ReloadPage("Keuken");
            }
            if (MenuItems[0].MenuTypeID == 1 || MenuItems[0].MenuTypeID == 2)
            {
                KeukenBar kb = KeukenBar.GetKeukenBar();
                kb.ReloadPage("Bar");
            }
            MessageBox.Show("Bestelling gereed gemeld.", "Gelukt!", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        public void GetColor() //bepaald kleuren voor hub knoppen
        {
            Login_Service service = Login_Service.GetLoginService();

            lbl_Ingelogd.Text = "Ingelogd: " + service.CurrentEmployee.Firstname + " " + service.CurrentEmployee.Lastname;
            int functionID = service.CurrentEmployee.FunctionID;

            switch (functionID)
            {
            case 1:
                btn_TableOverview.Visible     = true;
                btn_Checkout.Visible          = false;
                btn_TableOverview.BackColor   = Color.SkyBlue;
                btn_Bar.Visible               = false;
                btn_Keuken.Visible            = false;
                btn_BestellingOpnemen.Visible = false;
                btn_TableOverview.Location    = new Point(175, 57);
                Tafeloverzicht to = Tafeloverzicht.GetTafeloverzichtScreen();
                to.Show();
                break;

            case 2:
                btn_Keuken.Visible            = true;
                btn_Checkout.Visible          = false;
                btn_TableOverview.Visible     = false;
                btn_Bar.Visible               = false;
                btn_Keuken.BackColor          = Color.SkyBlue;
                btn_BestellingOpnemen.Visible = false;
                btn_Keuken.Location           = new Point(175, 57);
                KeukenBar kb = KeukenBar.GetKeukenBar();
                kb.Show();
                kb.ReloadPage("Keuken");
                break;

            case 3:
                btn_Bar.Visible               = true;
                btn_Checkout.Visible          = false;
                btn_TableOverview.Visible     = false;
                btn_Bar.BackColor             = Color.SkyBlue;
                btn_Keuken.Visible            = false;
                btn_BestellingOpnemen.Visible = false;
                btn_Bar.Location              = new Point(175, 57);
                KeukenBar kb1 = KeukenBar.GetKeukenBar();
                kb1.Show();
                kb1.ReloadPage("Bar");
                this.Hide(); break;

            case 4:
                btn_Bar.Visible               = true;
                btn_Checkout.Visible          = false;
                btn_TableOverview.Visible     = false;
                btn_Bar.BackColor             = Color.SkyBlue;
                btn_Keuken.Visible            = false;
                btn_BestellingOpnemen.Visible = false;
                btn_Bar.Location              = new Point(175, 57);
                KeukenBar kb2 = KeukenBar.GetKeukenBar();
                kb2.Show();
                kb2.ReloadPage("Bar");
                this.Hide(); break;

            case 5:
                btn_TableOverview.Visible     = true;
                btn_Bar.Visible               = true;
                btn_Keuken.Visible            = true;
                btn_Checkout.Visible          = false;
                btn_TableOverview.BackColor   = Color.SkyBlue;
                btn_Bar.BackColor             = Color.SkyBlue;
                btn_Keuken.BackColor          = Color.SkyBlue;
                btn_BestellingOpnemen.Visible = false;
                btn_Bar.Location              = new Point(10, 57);
                btn_TableOverview.Location    = new Point(175, 57);
                btn_Keuken.Location           = new Point(350, 57);
                break;
            }
        }