private void button4_Click(object sender, EventArgs e)
 {
     salon1 = new SALONLARIN_İÇİ();
     salon1.Show();
 }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            SqlCommand kaydet = new SqlCommand("Insert into SALON_ICI (SALON_ISIM,ADRES,FIYAT,SIRA_TARIH,EKSTRALAR,BILGILER,KAPASITE) values (@P1,@P2,@P3,@P4,@P5,@P6,@P7)", bgl.baglan());

            kaydet.Parameters.AddWithValue("@P1", textBox8.Text);
            kaydet.Parameters.AddWithValue("@P2", textBox5.Text);
            kaydet.Parameters.AddWithValue("@P3", textBox1.Text);
            kaydet.Parameters.AddWithValue("@P4", textBox4.Text);
            kaydet.Parameters.AddWithValue("@P5", textBox6.Text);
            kaydet.Parameters.AddWithValue("@P6", textBox7.Text);
            kaydet.Parameters.AddWithValue("@P7", textBox2.Text);
            kaydet.ExecuteNonQuery();

            //bgl.baglan().Close();
            //salon = new salon_table();
            //salon.Show();

            kula = new kullanici_icin();

            saloniç = new SALONLARIN_İÇİ();
            //saloniç.label12.Text = textBox8.Text;
            //saloniç.label14.Text = textBox1.Text;
            //saloniç.label16.Text = textBox5.Text;
            //saloniç.label17.Text = textBox4.Text;
            //saloniç.label19.Text = textBox6.Text;
            //saloniç.label20.Text = textBox7.Text;
            //saloniç.label18.Text = textBox2.Text;
            //saloniç.Show(this);

            SqlCommand sql = new SqlCommand("Select * From SALON_ICI", bgl.baglan());

            SqlDataReader read = sql.ExecuteReader();

            if (read.Read())
            {
                kula.label5.Text     = read["FIYAT"].ToString();
                kula.label3.Text     = read["ADRES"].ToString();
                kula.button4.Text    = read["SALON_ISIM"].ToString();
                saloniç.label12.Text = read["SALON_ISIM"].ToString();
                saloniç.label14.Text = read["FIYAT"].ToString();
                saloniç.label15.Text = read["FIYAT"].ToString();
                saloniç.label16.Text = read["ADRES"].ToString();
                saloniç.label17.Text = read["SIRA_TARIH"].ToString();
                saloniç.label18.Text = read["KAPASITE"].ToString();
                saloniç.label19.Text = read["EKSTRALAR"].ToString();
                saloniç.label20.Text = read["BILGILER"].ToString();
                label9.Text          = read["SALON_ISIM"].ToString();
            }

            bgl.baglan().Close();
            kula.Show();
            saloniç.pictureBox3.Image = pictureBox3.Image;
            saloniç.pictureBox4.Image = pictureBox4.Image;
            saloniç.pictureBox5.Image = pictureBox5.Image;
            saloniç.pictureBox6.Image = pictureBox6.Image;
            saloniç.pictureBox7.Image = pictureBox7.Image;
            saloniç.pictureBox8.Image = pictureBox8.Image;
            saloniç.pictureBox1.Image = pictureBox1.Image;
            saloniç.pictureBox2.Image = pictureBox2.Image;
            saloniç.Show(this);

            liste();
        }