using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
public partial class frmSatisListeleme : Form
{
public frmSatisListeleme()
{
InitializeComponent();
}
sinemaTableAdapters.Satis_BilgileriTableAdapter satislarlistesi = new sinemaTableAdapters.Satis_BilgileriTableAdapter();
private void button1_Click(object sender, EventArgs e)
{
Environment.Exit(0);
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
public partial class frmSeansListele : Form
{
public frmSeansListele()
{
InitializeComponent();
}
SqlConnection baglanti = new SqlConnection("Data Source=.\\sqlexpress;Initial Catalog=Sinema_Bileti;Integrated Security=True");
DataTable tablo = new DataTable();
private void button1_Click(object sender, EventArgs e)
{
Environment.Exit(0);
}
private void SeansListesi(string sql)
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
SqlConnection baglanti = new SqlConnection("Data Source=.\\sqlexpress;Initial Catalog=Sinema_Bileti;Integrated Security=True");
int sayac = 0;
private void FilmveSalonGetir(ComboBox combo, string sql1, string sql2)
{
baglanti.Open();
SqlCommand komut = new SqlCommand(sql1, baglanti);
SqlDataReader read = komut.ExecuteReader();
while (read.Read())
{
combo.Items.Add(read[sql2].ToString());
}
baglanti.Close();
}
private void Combo_Dolu_Koltuklar()
{
//comboKoltukiptal.Items.Clear();
//comboKoltukiptal.Text = "";
//foreach (Control item in groupBox1.Controls)
//{
// if (item is Button)
// {
// if (item.BackColor == Color.Red)
// {
// comboKoltukiptal.Items.Add(item.Text);
// }
// }
//}
}
private void YenidenidenRenklendirme()
{
//foreach (Control item in groupBox1.Controls)
//{
// if (item is Button)
// {
// item.BackColor = Color.White;
// }
//}
}
private void Veritabani_Dolu_Koltuklar()
{
//baglanti.Open();
//SqlCommand komut = new SqlCommand("select*from satis_bilgileri where filmadi='" + comboFilmAdi.SelectedItem + "'and salonadi='" + comboSalonAdi.Text + "'and tarih='" + comboFilmTarihi.SelectedItem + "'and seans='"+comboFilmSeansi.SelectedItem+ "'and koltukno='"+txtKoltukNo.Text+"'", baglanti);
//SqlDataReader read = komut.ExecuteReader();
//while (read.Read())
//{
// foreach (Control item in groupBox1.Controls)
// {
// if (item is Button)
// {
// if (read["koltukno"].ToString() != item.Text)
// {
// item.BackColor = Color.Red;
// continue;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
public partial class frmFilmEkle : Form
{
public frmFilmEkle()
{
InitializeComponent();
}
// sinemaTableAdapters.Film_BilgileriTableAdapter film = new sinemaTableAdapters.Film_BilgileriTableAdapter();
sinemaTableAdapters.Film_BilgileriTableAdapter film = new sinemaTableAdapters.Film_BilgileriTableAdapter();
private void button1_Click(object sender, EventArgs e)
{
try
{
// film.FilmEkleme(txtFilmaAdi.Text, txtYonetmen.Text, cmbFilmTuru.Text, txtSure.Text, dateTimePicker1.Text, txtYapimYili.Text, pictureBox2.ImageLocation);
film.FilmEkleme(txtFilmaAdi.Text, txtYonetmen.Text, cmbFilmTuru.Text, txtSure.Text, dateTimePicker1.Text, txtYapimYili.Text, pictureBox2.ImageLocation);
MessageBox.Show("Film Bilgileri Eklendi","Kayıt");
}
catch (Exception)
{
MessageBox.Show("Bu Film Daha Önce Eklendi!!!","Uyarı");
}
foreach (Control item in Controls) if (item is TextBox) item.Text = "";
cmbFilmTuru.Text = "";
pictureBox2.Image = null;
pictureBox2.Invalidate();
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
SqlConnection baglanti = new SqlConnection("Data Source=.\\sqlexpress;Initial Catalog=Sinema_Bileti;Integrated Security=True");
int sayac = 0;
private void FilmveSalonGetir(ComboBox combo, string sql1, string sql2)
{
baglanti.Open();
SqlCommand komut = new SqlCommand(sql1, baglanti);
SqlDataReader read = komut.ExecuteReader();
while (read.Read())
{
combo.Items.Add(read[sql2].ToString());
}
baglanti.Close();
}
private void Combo_Dolu_Koltuklar()
{
//comboKoltukiptal.Items.Clear();
//comboKoltukiptal.Text = "";
//foreach (Control item in groupBox1.Controls)
//{
// if (item is Button)
// {
// if (item.BackColor == Color.Red)
// {
// comboKoltukiptal.Items.Add(item.Text);
// }
// }
//}
}
private void YenidenidenRenklendirme()
{
//foreach (Control item in groupBox1.Controls)
//{
// if (item is Button)
// {
// item.BackColor = Color.White;
// }
//}
}
private void Veritabani_Dolu_Koltuklar()
{
//baglanti.Open();
//SqlCommand komut = new SqlCommand("select*from satis_bilgileri where filmadi='" + comboFilmAdi.SelectedItem + "'and salonadi='" + comboSalonAdi.Text + "'and tarih='" + comboFilmTarihi.SelectedItem + "'and seans='"+comboFilmSeansi.SelectedItem+ "'and koltukno='"+txtKoltukNo.Text+"'", baglanti);
//SqlDataReader read = komut.ExecuteReader();
//while (read.Read())
//{
// foreach (Control item in groupBox1.Controls)
// {
// if (item is Button)
// {
// if (read["koltukno"].ToString() != item.Text)
// {
// item.BackColor = Color.Red;
// continue;