Exemple #1
0
        // GET: Articulo/Details/5
        public ActionResult Details(int id)
        {
            SessionInitialize();
            ProductoCAD cad = new ProductoCAD(session);

            ProductoCEN cen = new ProductoCEN(cad);
            ProductoEN  en  = cen.ReadOID(id);

            AssemblerProducto ass = new AssemblerProducto();
            Producto          sol = ass.ConvertENToModelUI(en);


            IList <ComentarioEN> ten = en.Comentario;

            AssemblerComentario assc = new AssemblerComentario();
            IList <Comentario>  solc = assc.ConvertListENToModel(ten);

            SessionClose();

            System.Web.HttpContext.Current.Session["comen"] = id;



            // ViewData["action"] = "Details";
            ViewBag.coment = solc;
            return(View(sol));
        }
Exemple #2
0
        // GET: Articulo/Create
        public ActionResult Create()
        {
            ProductoEN        en  = new ProductoEN();
            AssemblerProducto ass = new AssemblerProducto();
            Producto          sol = ass.ConvertENToModelUI(en);

            ViewData["controller"] = System.Web.HttpContext.Current.Session["controller"] as String;
            ViewData["action"]     = System.Web.HttpContext.Current.Session["action"] as String;
            ViewData["arg"]        = System.Web.HttpContext.Current.Session["arg"];
            return(View(sol));
        }
Exemple #3
0
        // GET: Articulo/Edit/5
        public ActionResult Edit(int id)
        {
            ProductoCEN cen = new ProductoCEN();

            ProductoEN en = new ProductoEN();

            en = cen.ReadOID(id);

            // SessionInitializeTransaction();

            //IProducto productoCAD = new productoCAD(session);

            // ProductoEN en = new Pro;
            AssemblerProducto ass = new AssemblerProducto();
            Producto          sol = ass.ConvertENToModelUI(en);

            ViewData["controller"] = System.Web.HttpContext.Current.Session["controller"] as String;
            ViewData["action"]     = System.Web.HttpContext.Current.Session["action"] as String;
            ViewData["arg"]        = System.Web.HttpContext.Current.Session["arg"];



            return(View(sol));
        }