Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String datos = s.listarPeliculas();

            System.Data.DataTable tabla = JsonConvert.DeserializeObject <System.Data.DataTable>(datos);
            tabla.TableName           = "peliculas";
            this.GridView1.DataSource = tabla;
            this.GridView1.DataMember = "peliculas";
            this.GridView1.DataBind();
        }
Example #2
0
        protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
        {
            var item = e.Item;

            // Response.Write(item.Text);
            if (item.Text == "Altas")
            {
                this.div_movie.Visible   = false;
                this.row_lista.Visible   = false;
                this.row_edicion.Visible = false;
                this.row_alta.Visible    = true;
            }
            else if (item.Text == "Inicio")
            {
                Response.Redirect("WebForm1.aspx");
                this.div_movie.Visible   = false;
                this.row_lista.Visible   = true;
                this.row_edicion.Visible = false;
                this.row_alta.Visible    = false;
            }

            else if (item.Text == "Salir")
            {
                Session.RemoveAll();
                Response.Redirect("Login.aspx");
            }

            else if (item.Text == "Detalles")
            {
                this.div_movie.Visible = false;
                String           datos   = s.listarUsuarios();
                DataTable        tabla   = JsonConvert.DeserializeObject <DataTable>(datos);
                Reportes.Reporte reporte = new Reportes.Reporte();
                reporte.fill_Report(tabla);
            }

            else if (item.Text == "Contacto")
            {
                this.div_movie.Visible    = false;
                this.row_lista.Visible    = false;
                this.row_edicion.Visible  = false;
                this.row_alta.Visible     = false;
                this.div_contacto.Visible = true;
                //s.enviarCorreo(new String[]{"*****@*****.**"});
            }

            else if (item.Text == "Peliculas")
            {
                String datos = s.listarPeliculas();
                System.Data.DataTable tabla = JsonConvert.DeserializeObject <System.Data.DataTable>(datos);
                tabla.TableName           = "peliculas";
                this.GridView2.DataSource = tabla;
                this.GridView2.DataMember = "peliculas";
                this.GridView2.DataBind();

                this.row_lista.Visible    = false;
                this.row_edicion.Visible  = false;
                this.row_alta.Visible     = false;
                this.div_contacto.Visible = false;
                this.div_movie.Visible    = true;
                //s.enviarCorreo(new String[]{"*****@*****.**"});
            }
        }