private void button1_Click(object sender, EventArgs e) { //LOGIN İŞLEMLERİ try { string kAdi = textBox1.Text; int sifre = Convert.ToInt32(textBox2.Text); cmd = new SqlCommand(); con.Open(); cmd.Connection = con; cmd.CommandText = "SELECT * FROM Yonetici where yoneticiAdi='" + textBox1.Text + "' AND yoneticiSifre='" + textBox2.Text + "'"; dr = cmd.ExecuteReader(); if (dr.Read()) { YoneticiIslemleri y = new YoneticiIslemleri(); y.Show(); } else { MessageBox.Show("Kullanıcı adı ya da şifre yanlış"); } con.Close(); } //LOGIN İŞLEMLERİ catch (Exception ex) { MessageBox.Show("Kullanıcı adı ya da şifre yanlış"); return; } }
private void button7_Click(object sender, EventArgs e) { YoneticiIslemleri yi = new YoneticiIslemleri(); yi.Show(); this.Close(); }