Пример #1
0
        private void btnsalonekle_Click(object sender, EventArgs e)
        {
            SqlCommand komutg = new SqlCommand("insert into Salon(Salonno,Salonkoltuksayisi) values(@s1,@s2)", baglan.baglanti());

            komutg.Parameters.AddWithValue("@s1", txtsalon.Text);
            komutg.Parameters.AddWithValue("@s2", txtkoltuksayisi.Text);
            komutg.ExecuteNonQuery();
            baglan.baglanti().Close();
            MessageBox.Show("Kayıt Başarı ile eklendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            Salon frms = new Salon();

            frms.Show();
            this.Hide();
        }
Пример #2
0
        private void btnduzenle_Click(object sender, EventArgs e)
        {
            SqlCommand komutu = new SqlCommand("update Salon Set Salonno=@k1,Salonkoltuksayisi=@k2 where Salonid=@k3", baglan.baglanti());

            komutu.Parameters.AddWithValue("@k1", txtsalon.Text);
            komutu.Parameters.AddWithValue("@k2", txtkoltuksayisi.Text);
            komutu.Parameters.AddWithValue("@k3", txtid.Text);
            komutu.ExecuteNonQuery();
            baglan.baglanti().Close();
            MessageBox.Show("Güncelleme İşlemi Başarı ile Tamamlandı.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.None);
            Salon frs = new Salon();

            frs.Show();
            this.Hide();
        }
Пример #3
0
        private void button3_Click(object sender, EventArgs e)
        {
            Salon frs = new Salon();

            frs.Show();
        }