Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string kadi = textBox1.Text;
            string pw   = textBox2.Text;

            if (kadi == "" && pw == "")
            {
                MessageBox.Show("Lütfen Bos Alan Bırakmayınız");
            }
            else
            {
                DataRow veri = db.VeriSatiriCek("Select * From Login where KullaniciAdi='" + kadi + "' and Pw='" + pw + "'");
                if (veri == null)
                {
                    MessageBox.Show("Kullanıcı Adınız veya Sifreniz Hatalı");
                }
                else
                {
                    MessageBox.Show(kadi + " Giriş Başarılı Lütfen Bekleyiniz");
                    Login.KullaniciAdi = veri[1].ToString();
                    Login.Sifre        = veri[2].ToString();
                    Login.Yetki        = veri[3].ToString();
                    Login.Departman    = veri[4].ToString();
                    Form frm = new AnaSayfa();
                    this.Hide();
                    frm.Show();
                }
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string kadi = textBox1.Text;
            string pw   = textBox2.Text;

            if (kadi == "" && pw == "")
            {
                MessageBox.Show("Lütfen Boş Alan Bırakmayınız");
            }
            else
            {
                DataRow veri = db.VeriSatiriCek("Select * From Login where KullaniciAdi='" + kadi + "' and Pw='" + pw + "'");
                if (veri == null)
                {
                    MessageBox.Show("Kullanıcı Adınız veya Sifreniz Hatalı!");
                }
                else
                {
                    MessageBox.Show(kadi + " Giriş Başarılı Ana Sayfaya Yönlendiriliyorsunuz");
                    this.Hide();
                    AnaSayfa home = new AnaSayfa();
                    home.Show();
                }
            }
        }