Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     bussinesCategoria = new obCategoria();
     try {
         if (((AdministrativoEntity)this.Session["UserID"]) != null && ((AdministrativoEntity)this.Session["UserID"]).Acceso == 2)
         {
             MostrarCategorias();
         }
         else
         {
             Response.Redirect("Login.aspx");
         }
     } catch (InvalidCastException ic) {
         Response.Redirect("Principal.aspx");
     }
 }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        bussinesCategoria = new obCategoria();
        AgregarCategorias();

        int id = Convert.ToInt32(Request.QueryString["Id"]);

        if (id > 0)
        {
            TraerProductos(bussinesCategoria.CargarProductos(id));
        }
        else
        {
            MostrarPromocionados();
        }
    }