private void button1_Click(object sender, EventArgs e)
        {
            Ana gec = new Ana();

            gec.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Ana gec = new Ana();

            bagla.Open();
            SqlCommand loginName = new SqlCommand("select count(*) from Cbu_Admin where Cbu_Nick=@kulAdi and Cbu_Pass=@parola", bagla);

            loginName.Parameters.AddWithValue("@kulAdi", textBox1.Text);
            loginName.Parameters.AddWithValue("@parola", textBox2.Text);
            Int32 count = (Int32)loginName.ExecuteScalar();

            bagla.Close();
            if (count > 0)
            {
                ad_admin = textBox1.Text;
                this.Hide();
                gec.Show();
            }
            else
            {
                MessageBox.Show("Hatalı Kullanıcı Adı veya Şifre");
            }
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            Ana gec = new Ana();

            bagla.Open();
            SqlCommand loginName = new SqlCommand("select count(*) from Kullanici where kadi=@kulAdi and sifre=@parola", bagla);

            loginName.Parameters.AddWithValue("@kulAdi", textBox1.Text);
            loginName.Parameters.AddWithValue("@parola", textBox2.Text);
            Int32 count = (Int32)loginName.ExecuteScalar();

            bagla.Close();
            if (count > 0)
            {
                ad = textBox1.Text;
                this.Hide();
                gec.Show();
            }
            else
            {
                MessageBox.Show("hatalı giriş");
            }
        }