private void button1_Click(object sender, EventArgs e) { Bilet.ActiveForm.Hide(); BiletSatıs ac = new BiletSatıs(); ac.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { _szFilmAdi = comboBox2.Text.ToString(); _szSeans = comboBox1.Text.ToString(); _szTarih = comboBox3.Text.ToString(); BiletSatıs.ActiveForm.Hide(); foreach (Control item in this.Controls) { if (item is ComboBox) { if (item.Text == "") { MessageBox.Show("Lütfen Silinecek Filmi Seçiniz.", "Sinema Otomasyonu", MessageBoxButtons.OK, MessageBoxIcon.Error); BiletSatıs ac = new BiletSatıs(); ac.ShowDialog(); break; } else { Koltuk ac = new Koltuk(_szFilmAdi, _szSeans, _szTarih); ac.ShowDialog(); } } } }
private void button82_Click(object sender, EventArgs e) { DialogResult secenek = MessageBox.Show("İşlemi İptal Etmekte Emin misiniz ?", "Sinema Otomasyonu", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (secenek == DialogResult.Yes) { Koltuk.ActiveForm.Hide(); BiletSatıs ac = new BiletSatıs(); ac.ShowDialog(); } else { Koltuk.ActiveForm.Show(); } }
private void button1_Click_1(object sender, EventArgs e) { try { int sonuc; sonuc = (Convert.ToInt32(label8.Text) * Convert.ToInt32(textBox1.Text)) + (Convert.ToInt32(label11.Text) * Convert.ToInt32(textBox3.Text)); label14.Text = sonuc.ToString(); } catch (Exception ex) { MessageBox.Show("Hatalı Satış."); Koltuk.ActiveForm.Hide(); BiletSatıs ac = new BiletSatıs(); ac.ShowDialog(); } }
private void button81_Click(object sender, EventArgs e) { foreach (Control item_ in this.Controls) { if (item_ is Label) { if (item_.Text == "") { MessageBox.Show("Lütfen Bilet Türü ve Sayısıni Girdikten Sonra Ücrete Tıklayınız.", "Sinema Otomasyonu", MessageBoxButtons.OK, MessageBoxIcon.Error); break; } else { List <string> satilacakKoltuklar = new List <string>(); foreach (Control item in this.Controls) { if (item is Button) { if (((Button)item).BackColor == Color.Red) { satilacakKoltuklar.Add(item.Tag.ToString()); } } } BiletSatıs frmBiletSatir = new BiletSatıs(); frmBiletSatir.baglanti.Open(); string szQuerrey = ""; foreach (string szKoltuk in satilacakKoltuklar) { szQuerrey += " Insert into KoltukTb (FilmAdi,KoltukAdi,Tutar,Seans,Tarih) Values('" + _szFilmAdi + "','" + szKoltuk + "','" + label14.Text + "','" + _szSeans + "','" + _szTarih + "')"; } SqlCommand komut = new SqlCommand(szQuerrey, frmBiletSatir.baglanti); komut.ExecuteNonQuery(); frmBiletSatir.baglanti.Close(); MessageBox.Show("Seçilen Koltuklar Satıldı.", "Sinema Otomasyonu"); Koltuk.ActiveForm.Hide(); BiletSatıs ac = new BiletSatıs(); ac.ShowDialog(); } } } }