private void pictureBox1_Click(object sender, EventArgs e) { YöneticiEkrani yonekrani = new YöneticiEkrani(); this.Close(); yonekrani.Show(); }
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") { kasaEkran = new MainMenu(); kasaEkran.Show(); textBox1.Clear(); textBox2.Clear(); } else if (sunucu.authorization[i] == "asci") { asciEkran = new formAsci(); asciEkran.Show(); textBox1.Clear(); textBox2.Clear(); } else if (sunucu.authorization[i] == "admin") { yoneticiEkran = new YöneticiEkrani(); yoneticiEkran.Show(); 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; } } } }