private void button4_Click(object sender, EventArgs e) { Adminislemleri im = new Adminislemleri(); im.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { // k.kullaniciad = textBox1.Text; k.sifre = textBox2.Text; SqlConnection con = new SqlConnection("Data Source=ASUSN750JK;Initial Catalog=DemirbasDB;Integrated Security=True"); con.Open(); string sql = "Select * from personelTablo where kullanıcıAd='" + textBox1.Text + "' and (Dept='admin') and kullaniciSifre='" + textBox2.Text + "';"; SqlCommand cmd = new SqlCommand(sql, con); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt); if (dt.Rows.Count > 0) { Adminislemleri adm = new Adminislemleri(); adm.Show(); this.Hide(); } else { persgit(); } }