//////////// //////////// UYARI BUTONLARI //////////// private void DevamEtBtn_Click(object sender, EventArgs e) { MasaSecimEkran form1 = new MasaSecimEkran(); form1.Show(); this.Hide(); }
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; } } } }
//////////// //////////// ANA BUTONLAR //////////// private void AnaGeri_Click(object sender, EventArgs e) { if (masaSiparis.SecilenYemekAd.Count > 0) { secimPanel.Visible = true; anaPanel.Visible = false; anaGeri.Enabled = false; butonBox.Enabled = false; secimPanel.Location = new Point(390, 265); } else { MasaSecimEkran form1 = new MasaSecimEkran(); form1.Show(); this.Hide(); } }
public void masaAc(MasaSecimEkran form1, int selectedTable, Panel secimPaneli) { try { baglan.Open(); } catch (Exception e) { } //SqlCommand komut = new SqlCommand(" Update masaBilgi set masaDurum='" + "1" + "' where masaNo=(" + selectedTable + ")", baglan); SQLiteCommand komut = new SQLiteCommand("Update masaBilgi set masaDurum='" + "1" + "' where masaNo=(" + selectedTable + ")", baglan); komut.ExecuteNonQuery(); koltukYenile(); secimPaneli.Visible = false; for (int i = 0; i < dizi.Length; i++) { dizi[i].Enabled = true; } baglan.Close(); MasaMenuEkran form2 = new MasaMenuEkran(); form2.Show(); form1.Hide(); }