Esempio n. 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            adminpaneli geri = new adminpaneli();

            geri.Show();
            this.Hide();
        }
Esempio n. 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string ad    = textBox1.Text;
            string sifre = textBox1.Text;

            con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=admingirisi.mdb");
            cmd = new OleDbCommand();
            con.Open();
            cmd.Connection  = con;
            cmd.CommandText = "SELECT * FROM admingirisi where a_ad='" + textBox1.Text + "' AND a_sifre='" + textBox2.Text + "'";
            dr = cmd.ExecuteReader();
            if (dr.Read())
            {
                adminpaneli giris = new adminpaneli();
                giris.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Yetkili adı ya da şifre yanlış");
                textBox1.Clear();
                textBox2.Clear();
            }

            con.Close();
        }