Exemple #1
0
        public void wczytajSeanse()
        {
            KinoClass cla = new KinoClass();
            DataTable tab = cla.table_get_data("Select * From Seans");

            dataGridView1.DataSource = tab;
        }
        public void wczytajSale()
        {
            KinoClass cla = new KinoClass();
            DataTable tab = cla.table_get_data("select * from sala where sala_id =" + get_number_sala + ";");

            textBox7.Text = tab.Rows[0][0].ToString();
            textBox8.Text = tab.Rows[0][1].ToString();
        }
        public void wczytajSeans()
        {
            KinoClass cla = new KinoClass();
            DataTable tab = cla.table_get_data("select * from Seans where seans_id =" + get_number_seans + ";");

            dateTimePicker1.Value = (DateTime)tab.Rows[0][3];
            textBox9.Text         = tab.Rows[0][4].ToString();
        }
        public void WczytajSale()
        {
            KinoClass cla = new KinoClass();
            DataTable tab = cla.table_get_data("select * from Sala");

            comboBox2.DataSource    = tab;
            comboBox2.DisplayMember = "nazwa";
            comboBox2.ValueMember   = "sala_id";
        }
        public void WczytajFilmy()
        {
            KinoClass cla = new KinoClass();
            DataTable tab = cla.table_get_data("select * from Film");

            comboBox1.DataSource    = tab;
            comboBox1.DisplayMember = "tytuł";
            comboBox1.ValueMember   = "film_id";
        }
        private void button2_Click(object sender, EventArgs e)
        {
            KinoClass cla = new KinoClass();
            DataTable tab = cla.table_get_data("DELETE from Seans where seans_id =" + get_number_seans + ";");

            MessageBox.Show("The Performance Has Been Successfully DELETED", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            DialogResult = DialogResult.OK;
            ListaSeansów listaSeansów = new ListaSeansów();
        }
        public void wczytajFilm()
        {
            KinoClass cla = new KinoClass();
            DataTable tab = cla.table_get_data("select * from Film where film_id =" + get_number_film + ";");

            textBox10.Text = tab.Rows[0][0].ToString();
            textBox2.Text  = tab.Rows[0][1].ToString();
            textBox3.Text  = tab.Rows[0][2].ToString();
            textBox4.Text  = tab.Rows[0][3].ToString();
            textBox5.Text  = tab.Rows[0][4].ToString();
        }
 public void Check()
 {
     if (check == true)
     {
         get_number_film         = SzczegółySeansu.get_number_film;
         get_number_sala         = SzczegółySeansu.get_number_sala;
         get_number_seans        = SzczegółySeansu.get_number_seans;
         comboBox1.SelectedValue = get_number_film;
         comboBox2.SelectedValue = get_number_sala;
         KinoClass cla = new KinoClass();
         DataTable tab = cla.table_get_data("select data_czas,czas_reklamy from Seans where seans_id= " + get_number_seans + ";");
         dateTimePicker1.Value = (DateTime)tab.Rows[0][0];
         numericUpDown1.Value  = (int)tab.Rows[0][1];
     }
     else
     {
         dateTimePicker1.MinDate = DateTime.Now;
     }
 }