Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session[Session.SessionID + "sesionUsuario"] != null)
            {
                BL_Articulo neg_art = new BL_Articulo();

                List <Articulo> Lista_art;

                try
                {
                    Lista_art = neg_art.listar();

                    var articulo_Seleccionado = Convert.ToInt32(Request.QueryString["idart"]);
                    articulo = Lista_art.Find(J => J.ID == articulo_Seleccionado);
                }
                catch (Exception ex)
                {
                    Session["Error" + Session.SessionID] = ex;
                    Response.Redirect("Error.aspx");
                }
            }
            else
            {
                Response.Redirect("DefaultExpiroSesion");
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Negocio_articulo neg_art = new Negocio_articulo();

            List <Articulo> Lista_art;

            try
            {
                Lista_art = neg_art.listar();

                var articulo_Seleccionado = Convert.ToInt32(Request.QueryString["idart"]);
                articulo = Lista_art.Find(J => J.ID == articulo_Seleccionado);
            }
            catch (Exception ex)
            {
                //Session["Error" + Session.SessionID] = ex;
                //Response.Redirect("Error.aspx");
            }
        }