// GET: Articulo/mostrar_cap/5 public ActionResult mostrar_cap(int id) { //lazy-fetching = false; SessionInitialize(); TemporadaCAD cad = new TemporadaCAD(session); TemporadaCEN cen = new TemporadaCEN(cad); TemporadaEN en = cen.ReadOID(id); IList <CapituloEN> ten = en.Capitulo; AssemblerCapitulo ass = new AssemblerCapitulo(); IList <Capitulo> sol = ass.ConvertListENToModel(ten); SessionClose(); System.Web.HttpContext.Current.Session["idtemp"] = id; return(View(sol)); }
public void Anyadircap(int p_oid, string p_nombre, Nullable <DateTime> p_fecha, string p_descripcion, string p_imagen) { /*PROTECTED REGION ID(SMPGenNHibernate.CP.SMP_Temporada_anyadircap) ENABLED START*/ ITemporadaCAD temporadaCAD = null; TemporadaCEN temporadaCEN = null; try { SessionInitializeTransaction(); temporadaCAD = new TemporadaCAD(session); temporadaCEN = new TemporadaCEN(temporadaCAD); // Write here your custom transaction ... throw new NotImplementedException("Method Anyadircap() not yet implemented."); SessionCommit(); } catch (Exception ex) { SessionRollBack(); throw ex; } finally { SessionClose(); } /*PROTECTED REGION END*/ }
public void Borrarcap(int p_oid, int p_id_cap) { /*PROTECTED REGION ID(SMPGenNHibernate.CP.SMP_Temporada_borrarcap) ENABLED START*/ ITemporadaCAD temporadaCAD = null; TemporadaCEN temporadaCEN = null; try { SessionInitializeTransaction(); temporadaCAD = new TemporadaCAD(session); temporadaCEN = new TemporadaCEN(temporadaCAD); // Write here your custom transaction ... throw new NotImplementedException("Method Borrarcap() not yet implemented."); SessionCommit(); } catch (Exception ex) { SessionRollBack(); throw ex; } finally { SessionClose(); } /*PROTECTED REGION END*/ }