Example #1
0
        public void actualizarcartelera()
        {
            try
            {
                NCartelera listacartelera = new NCartelera();
                listaCar = listacartelera.listacartelera();

                var lista = (from car in listaCar
                             select new
                {
                    car.Id_Cartelera,
                    Pelicula = car.Id_Pelicula.Nombre,
                    Sala = car.Id_Sala.nombre,
                    car.Fecha,
                    car.Hora,
                    car.valor,
                    car.Id_Pelicula.IdPelicula,
                    car.Id_Sala.IdSala
                }).ToList();
                dgvCartelera.DataSource = lista;
                dgvCartelera.Columns["IdPelicula"].Visible   = false;
                dgvCartelera.Columns["IdSala"].Visible       = false;
                dgvCartelera.Columns["Id_Cartelera"].Visible = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #2
0
        private void FrmBuscarCartelera_Load(object sender, EventArgs e)
        {
            try
            {
                NCartelera        listacartelera = new NCartelera();
                List <ECartelera> listaCar       = listacartelera.listacartelera();

                var lista = (from car in listaCar
                             select new
                {
                    car.Id_Cartelera,
                    Pelicula = car.Id_Pelicula.Nombre,
                    Sala = car.Id_Sala.nombre,
                    car.Fecha,
                    car.Hora,
                    car.valor,
                    car.Id_Pelicula.IdPelicula,
                    car.Id_Sala.IdSala
                }).ToList();
                dgvBuscarCartelera.DataSource = lista;
                //dgvBuscarCartelera.Columns["IdPelicula"].Visible = false;
                //  dgvBuscarCartelera.Columns["IdSala"].Visible = false;
                // dgvBuscarCartelera.Columns["Id_Cartelera"].Visible = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }