private void button1_Click(object sender, EventArgs e) { try { baglanti.Open(); String sql = "SELECT * FROM Tbl_Kullanicilar WHERE Ad=@adi AND Sifre = @sifresi"; SqlParameter prm1 = new SqlParameter("adi", txtbxKullaniciAdi.Text.Trim()); SqlParameter prm2 = new SqlParameter("sifresi", txtbxSifre.Text.Trim()); SqlCommand komut = new SqlCommand(sql, baglanti); komut.Parameters.Add(prm1); komut.Parameters.Add(prm2); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(komut); da.Fill(dt); if (dt.Rows.Count > 0) { FrmKitapKatalogu gecis = new FrmKitapKatalogu(); gecis.Show(); this.Hide(); } } catch (Exception) { MessageBox.Show("Hatali Giris"); throw; baglanti.Close(); } }
private void pictureBox2_Click(object sender, EventArgs e) { FrmKitapKatalogu anasayfa = new FrmKitapKatalogu(); anasayfa.Show(); this.Hide(); }
private void pictureBox1_Click(object sender, EventArgs e) { FrmKitapKatalogu katalogagecis = new FrmKitapKatalogu(); katalogagecis.Show(); this.Hide(); }