示例#1
0
        // GET: Articulo/mostrar_temp/5
        public ActionResult mostrar_temp(int id)
        {
            //lazy-fetching = false;
            SessionInitialize();
            SerieCAD cad = new SerieCAD(session);

            SerieCEN cen = new SerieCEN(cad);
            SerieEN  en  = cen.ReadOID(id);

            IList <TemporadaEN> ten = en.Temporada;

            AssemblerTemporada ass = new AssemblerTemporada();
            IList <Temporada>  sol = ass.ConvertListENToModel(ten);

            SessionClose();

            System.Web.HttpContext.Current.Session["idserie"] = new { id = id };
            return(View(sol));
        }
示例#2
0
        public void Anyadirtemporada(int p_oid, string p_nombre)
        {
            /*PROTECTED REGION ID(SMPGenNHibernate.CP.SMP_Serie_anyadirtemporada) ENABLED START*/

            ISerieCAD serieCAD = null;
            SerieCEN  serieCEN = null;



            try
            {
                SessionInitializeTransaction();
                serieCAD = new SerieCAD(session);
                serieCEN = new  SerieCEN(serieCAD);



                // Write here your custom transaction ...

                throw new NotImplementedException("Method Anyadirtemporada() not yet implemented.");



                SessionCommit();
            }
            catch (Exception ex)
            {
                SessionRollBack();
                throw ex;
            }
            finally
            {
                SessionClose();
            }


            /*PROTECTED REGION END*/
        }
示例#3
0
        // GET: Articulo/Details/5
        public ActionResult Details(int id)
        {
            SessionInitialize();
            SerieCAD cad = new SerieCAD(session);

            SerieCEN cen = new SerieCEN(cad);
            SerieEN  en  = cen.ReadOID(id);

            AssemblerSerie ass = new AssemblerSerie();
            Serie          sol = ass.ConvertENToModelUI(en);

            IList <TemporadaEN> ten = en.Temporada;

            AssemblerTemporada assc = new AssemblerTemporada();
            IList <Temporada>  solc = assc.ConvertListENToModel(ten);

            SessionClose();

            System.Web.HttpContext.Current.Session["id_serie"] = id;
            ViewBag.temp = solc;

            return(View(sol));
        }