예제 #1
0
        void ReloadForm()
        {
            Salon1 sln1 = new Salon1();

            sln1.Show();
            this.Close();
        }
예제 #2
0
 // Bilet Kes
 private void button13_Click(object sender, EventArgs e)
 {
     baglanti.Open();
     komut.Connection  = baglanti;
     komut.CommandText = "SELECT * FROM filmekle where Salon='" + comboBox3.Text + "'AND Seans_Gunu='" + dateTimePicker1.Text + "'AND Seans_saati='" + comboBox2.Text + "'AND Film_adı='" + textBox1.Text + "'";
     dr = komut.ExecuteReader();
     if (textBox1.Text == "" || comboBox4.Text == "" || textBox3.Text == "" || textBox4.Text == "" || textBox5.Text == "" || dateTimePicker1.Text == "" || comboBox2.Text == "" || comboBox3.Text == "")
     {
         MessageBox.Show("Boş Alan Bırakılamaz");
     }
     else if (dr.Read())
     {
         if (comboBox3.Text == "1")
         {
             Salon1.filmadı    = textBox1.Text;
             Salon1.seansgunu  = dateTimePicker1.Text;
             Salon1.seanssaati = comboBox2.Text;
             Salon1 sln1 = new Salon1();
             sln1.Show();
             this.Hide();
         }
         else if (comboBox3.Text == "2")
         {
             Salon2.filmadı2    = textBox1.Text;
             Salon2.seansgunu2  = dateTimePicker1.Text;
             Salon2.seanssaati2 = comboBox2.Text;
             Salon2 sln2 = new Salon2();
             sln2.Show();
             this.Hide();
         }
     }
     else
     {
         MessageBox.Show("Değerleri Değiştirmeyiniz");
     }
     baglanti.Close();
 }