Beispiel #1
0
 private void BtnSil_Click(object sender, EventArgs e)
 {
     baglanti.Open();
     komut = new SqlCommand("delete from Admin where YöneticiAd=@y", baglanti);
     komut.Parameters.AddWithValue("@y", TxtYAd.Text);
     komut.ExecuteNonQuery();
     VerileriGoster("Select * From Admin");
     baglanti.Close();
     TxtYAd.Clear();
 }
Beispiel #2
0
        private void BtnKaydet_Click(object sender, EventArgs e)
        {
            baglanti.Open();
            komut = new SqlCommand("insert into Admin (YöneticiAd,YöneticiParola) values (@y,@p)", baglanti);

            komut.Parameters.AddWithValue("@y", TxtYAd.Text);
            komut.Parameters.AddWithValue("@p", TxtParola.Text);
            komut.ExecuteNonQuery();
            VerileriGoster("Select * From Admin");
            baglanti.Close();
            TxtYAd.Clear();
            TxtParola.Clear();
        }