예제 #1
0
        private void HomeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Chapoo chapoo = Chapoo.GetInstance();

            this.Close();
            chapoo.Show();
        }
예제 #2
0
        private void MS1I_Home_Click(object sender, EventArgs e)
        {
            Chapoo chapoo = Chapoo.GetInstance();

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

            chapoo.Show();
        }
예제 #4
0
        private void MS1I_Home_Click(object sender, EventArgs e)
        {
            this.Close();
            Chapoo chapoo = Chapoo.GetInstance();

            chapoo.ShowDialog();
        }
예제 #5
0
 public static Chapoo GetInstance()
 {
     if (Instance == null)
     {
         Instance = new Chapoo();
     }
     return(Instance);
 }
예제 #6
0
        private void btnAfmelden_Click(object sender, EventArgs e)
        {
            //sluit het huidige venster en het home scherm, laat het oude aanmelden form zien.
            this.Close();
            Chapoo form = Chapoo.GetInstance();

            form.Close();

            AanmeldenForm form2 = AanmeldenForm.GetInstance();

            form2.Show();
        }
예제 #7
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");
            }
        }