Esempio n. 1
0
        private void venta_boletos_Load(object sender, EventArgs e)
        {
            CargarItemsCombobox c = new CargarItemsCombobox();

            c.llenaritemP(comboBox1);
            c.llenaritemH(comboBox2);
        }
Esempio n. 2
0
        private void usuario_compra_Load(object sender, EventArgs e)
        {
            CargarItemsCombobox c = new CargarItemsCombobox();

            c.llenaritemH(comboBox2);

            string    sql;
            string    conexion = "Data Source=USER;Initial Catalog=CINE;Integrated Security=True;";
            DataTable dt       = new DataTable();

            sql = "select " +
                  "ID_PELICULA" + " as 'Cod.Pelicula' , " +
                  "PL_TITULO" + " as Titulo, " +
                  "PL_IDIOMA" + " as Idioma, " +
                  "PL_CLASIFICACION" + " as Clasificacion, " +
                  "PL_DURACION" + " as Duracion, " +
                  "PL_GENERO" + " as Genero, " +
                  "PL_SINOPSIS" + " as Sinopsis, " +
                  "PL_DIRECTOR" + " as Director, " +
                  "PL_IMAGEN" + " as Posters" +
                  " from " + "PELICULA";
            SqlConnection sqlconn = new SqlConnection(conexion);

            sqlconn.Open();//abre conexion

            SqlDataAdapter sqlda = new SqlDataAdapter(sql, sqlconn);

            sqlda.Fill(dt);
            sqlconn.Close();
            dataGridView1.DataSource = dt;

            comboBox1.DataSource    = cargarCbxPelicula();
            comboBox1.DisplayMember = "PELICULA";
            comboBox1.ValueMember   = "PL_TITULO";
        }
Esempio n. 3
0
        private void cine_controller_Load(object sender, EventArgs e)
        {
            CargarItemsCombobox c = new CargarItemsCombobox();

            c.llenaritem(comboBox1);
            linkLabel1.Links.Add(0, linkLabel1.Text.Length, "https://www.youtube.com/watch?v=k4iHpy1z1fg");
        }
Esempio n. 4
0
        private void trabajador_agr_Load(object sender, EventArgs e)
        {
            CargarItemsCombobox c = new CargarItemsCombobox();

            c.llenaritemT(comboBox2);
            textBox7.Enabled = false;
            dt      = new DataTable();
            sql     = selec;
            sqlconn = new SqlConnection(conexion);
            sqlconn.Open();
            sqlda = new SqlDataAdapter(sql, sqlconn);
            sqlda.Fill(dt);
            sqlconn.Close();
            dataGridView1.DataSource = dt;
        }