Exemplo n.º 1
0
        private void anaMenüToolStripMenuItem_Click(object sender, EventArgs e)
        {
            anamenü ac = new anamenü();

            ac.Show();
            this.Hide();
        }
        private void btngiris_Click(object sender, EventArgs e)
        {
            OleDbCommand    komut = new OleDbCommand("select * from calisanlar where kullaniciadi='" + kullniciadi.Text.ToString() + "' and sifre='" + sifre.Text.ToString() + "'", baglanti);
            OleDbDataReader oku   = komut.ExecuteReader();

            if (oku.Read())
            {
                anamenü ac = new anamenü();
                ac.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Kullanıcı Adı veya Şifre yanlış", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }