Example #1
0
        private void btnconsultodo_Click(object sender, EventArgs e)
        {
            CapaNegocio.Cartelera peliculas   = new CapaNegocio.Cartelera();
            DataTable             dtCartelera = new DataTable();

            dtCartelera             = peliculas.BuscarCarteleras();
            dtgcartelera.DataSource = dtCartelera;
        }
Example #2
0
        private void btnconsultar_Click(object sender, EventArgs e)
        {
            CapaNegocio.Cartelera Cartelera   = new CapaNegocio.Cartelera();
            DataTable             dtCartelera = new DataTable();

            dtCartelera             = Cartelera.buscar(Int32.Parse(txtidcartelera.Text));
            dtgcartelera.DataSource = dtCartelera;
        }
Example #3
0
 private void btnmodificar_Click(object sender, EventArgs e)
 {
     CapaNegocio.Cartelera Cartelera = new CapaNegocio.Cartelera();
     if (Cartelera.actualizarCartelera(Int32.Parse(txtidcartelera.Text), Int32.Parse(txtidpelicula.Text), Int32.Parse(txtidsala.Text), txtfecha.Text, txthoraini.Text, txthorafin.Text))
     {
         MessageBox.Show("Cartelera modificada correctamente");
         Limpiar();
     }
     else
     {
         MessageBox.Show("Error Desconocido");
     }
 }
Example #4
0
        private void btneliminar_Click(object sender, EventArgs e)
        {
            CapaNegocio.Cartelera Cartelera = new CapaNegocio.Cartelera();
            try
            {
                Cartelera.eliminarCartelera(Int32.Parse(txtidcartelera.Text));

                MessageBox.Show("Cartelera Eliminada");
                Limpiar();
            }
            catch
            {
                MessageBox.Show("Error Desconocido");
            }
        }
Example #5
0
        private void btnagregar_Click(object sender, EventArgs e)
        {
            CapaNegocio.Cartelera Cartelera = new CapaNegocio.Cartelera();

            try
            {
                Cartelera.insertarCartelera(Int32.Parse(txtidcartelera.Text), Int32.Parse(txtidpelicula.Text), Int32.Parse(txtidsala.Text), txtfecha.Text, txthoraini.Text, txthorafin.Text);

                MessageBox.Show("Cartelera agregada correctamente");
                Limpiar();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error Desconocido");
                Limpiar();
            }
        }