Exemplo n.º 1
0
        private void btngiris_Click(object sender, EventArgs e)
        {
            dbEnginee nesne = new dbEnginee();
            DataTable dt    = nesne.Girisyap(txtKullaniciAd.Text, txtSifre.Text);

            if (dt.Rows.Count == 0)
            {
                MessageBox.Show("Hatalı Giriş Yaptınız!", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            else
            {
                this.Hide();

                Anasayfa.AdSoyad               = dt.Rows[0]["AdSoyad"].ToString();
                Anasayfa.YetkiDurum            = dt.Rows[0]["YetkiDurum"].ToString();
                Anasayfa.pkKullaniciID         = Convert.ToInt32(dt.Rows[0]["pkKullaniciID"]);
                kitaplar.YetkiDurum            = dt.Rows[0]["YetkiDurum"].ToString();
                kullanicibilgileri.KullaniciAd = dt.Rows[0]["KullaniciAd"].ToString();
                kullanicibilgileri.AdSoyad     = dt.Rows[0]["AdSoyad"].ToString();
                sifre.Sifre = dt.Rows[0]["Sifre"].ToString();
                Anasayfa ac = new Anasayfa();
                ac.ShowDialog();
            }
        }