Пример #1
0
        private void CikisBtn_Click(object sender, EventArgs e)
        {
            musteriEkranGiris form = new musteriEkranGiris();

            form.Show();
            this.Close();
        }
        private void Button1_Click(object sender, EventArgs e)
        {
            sunucu.getData();

            if (textBox1.Text == "" || textBox2.Text == "")
            {
                MessageBox.Show("Kutular Boş Olamaz..!");
            }

            else if (textBox1.Text != "" && textBox2.Text != "")
            {
                for (int i = 0; i < sunucu.userName.Count; i++)
                {
                    if (textBox1.Text == sunucu.userName[i] && textBox2.Text == sunucu.password[i])
                    {
                        //sunucu.errorUpdate(-1);
                        //statusControl();
                        MessageBox.Show("Başarılı Giriş");

                        if (sunucu.authorization[i] == "garson")
                        {
                            masaSecimEkran = new MasaSecimEkran();
                            masaSecimEkran.Show();
                            textBox1.Clear(); textBox2.Clear();
                        }
                        else if (sunucu.authorization[i] == "musteri")
                        {
                            musteriEkranGiris = new musteriEkranGiris();
                            musteriEkranGiris.Show();
                            textBox1.Clear(); textBox2.Clear();
                        }
                        else if (sunucu.authorization[i] == "kasa")
                        {
                            textBox1.Clear(); textBox2.Clear();
                        }
                        else if (sunucu.authorization[i] == "asci")
                        {
                            textBox1.Clear(); textBox2.Clear();
                        }
                        else if (sunucu.authorization[i] == "admin")
                        {
                            textBox1.Clear(); textBox2.Clear();
                        }
                        break;
                    }
                    else if (i + 1 == sunucu.userName.Count)
                    {
                        MessageBox.Show("Girilen Bilgiler Hatalı .. \nTekrar Deneyin !");
                        textBox1.Clear(); textBox2.Clear();
                        hataliGiris++;
                        //sunucu.errorUpdate(hataliGiris);
                        statusControl();
                        break;
                    }
                }
            }
        }
Пример #3
0
 private void Timer1_Tick(object sender, EventArgs e)
 {
     a++;
     if (a == 5)
     {
         musteriEkranGiris ekran = new musteriEkranGiris();
         ekran.Show();
         this.Hide();
     }
 }