Beispiel #1
0
        private void MS1I_Home_Click(object sender, EventArgs e)
        {
            Chapoo chapoo = Chapoo.GetInstance();

            Hide();
            chapoo.Show();
        }
        private void homeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            Chapoo chapoo = Chapoo.GetInstance();

            chapoo.Show();
        }
Beispiel #3
0
        private void HomeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Chapoo chapoo = Chapoo.GetInstance();

            this.Close();
            chapoo.Show();
        }
Beispiel #4
0
        private void btnAanmelden_Click(object sender, EventArgs e)
        {
            Werknemer_Service service    = new Werknemer_Service();
            List <Werknemer>  werknemers = service.GetWerknemerPins();
            bool   CorrectPin            = false;
            string naam  = "";
            string types = "";
            int    type  = 0; // 1=  bediener 2= barman  3= kok  4= eigenaar                                    //4365

            if (tbPin.Text.Length != 0)
            {
                int pin = int.Parse(tbPin.Text);
                foreach (Werknemer item in werknemers)
                {
                    if (item.PIN == pin && item.Type != 1) //alleen bedieners kunnen niet inloggen
                    {
                        CorrectPin = true;
                        naam       = item.Naam;
                        type       = item.Type;
                        break;
                    }
                    else
                    {
                        CorrectPin = false;
                    }
                }
            }
            if (CorrectPin)
            {
                switch (type)
                {
                case 1:
                    types = "bediener";
                    break;

                case 2:
                    types = "barman";
                    break;

                case 3:
                    types = "kok";
                    break;

                case 4:
                    types = "eigenaar";
                    break;

                default:
                    MessageBox.Show("error");
                    break;
                }
                MessageBox.Show($"Welkom {naam} jij bent een {types} ");
                Chapoo form = Chapoo.GetInstance();
                Hide();
                form.Show();
            }
            else
            {
                MessageBox.Show("voer een geldige pincode in");
            }
        }