Exemplo n.º 1
0
 private void btnGırıs_Click(object sender, EventArgs e)
 {
     // kullancı var mı yok mu sorgusu
     // tum kullanıcı tablosunu cektik ve foreach sokarak kotrol ettik
     // var sa frmkullanıcıya yonlendirsin yok sa msj versin
     var KullaniciSorgu = from k in context.Kullanicis select k;
     foreach (var item in KullaniciSorgu)
     {
         if (item.KullaniciAdi==txtAd.Text && item.KullaniciSifre==txtSifre.Text)
         {
             frmKullanaci frm = new frmKullanaci();
             frm.ShowDialog();
             break;
         }
         else
         {
             MessageBox.Show("Boyle bir Kullanıcı yok");
         }
     }
 }
Exemplo n.º 2
0
        private void btnGırıs_Click(object sender, EventArgs e)
        {
            // kullancı var mı yok mu sorgusu
            // tum kullanıcı tablosunu cektik ve foreach sokarak kotrol ettik
            // var sa frmkullanıcıya yonlendirsin yok sa msj versin
            var KullaniciSorgu = from k in context.Kullanicis select k;

            foreach (var item in KullaniciSorgu)
            {
                if (item.KullaniciAdi == txtAd.Text && item.KullaniciSifre == txtSifre.Text)
                {
                    frmKullanaci frm = new frmKullanaci();
                    frm.ShowDialog();
                    break;
                }
                else
                {
                    MessageBox.Show("Boyle bir Kullanıcı yok");
                }
            }
        }