public void BorrarPuntuacionGymkana(int id_evento) { /*PROTECTED REGION ID(WhateverGenNHibernate.CP.Whatever_Puntuacion_borrarPuntuacionGymkana) ENABLED START*/ IPuntuacionCAD puntuacionCAD = null; PuntuacionCEN puntuacionCEN = null; try { SessionInitializeTransaction(); puntuacionCAD = new PuntuacionCAD(session); puntuacionCEN = new PuntuacionCEN(puntuacionCAD); // Write here your custom transaction ... System.Collections.Generic.IList <PuntuacionEN> puntuaciones = new System.Collections.Generic.List <PuntuacionEN>(); puntuaciones = puntuacionCAD.FiltrarPuntuacionPorGymkana(id_evento); foreach (PuntuacionEN element in puntuaciones) { puntuacionCAD.UnrelationerPuntuacionGymkana(element.Id, id_evento); puntuacionCAD.Destroy(element.Id); } SessionCommit(); } catch (Exception ex) { SessionRollBack(); throw ex; } finally { SessionClose(); } /*PROTECTED REGION END*/ }
public int CrearPuntuacionParaGymkana(int id_evento, int puntuacion, int id_usuario) { /*PROTECTED REGION ID(WhateverGenNHibernate.CP.Whatever_Puntuacion_crearPuntuacionParaGymkana) ENABLED START*/ IPuntuacionCAD puntuacionCAD = null; PuntuacionCEN puntuacionCEN = null; int result = -1; try { SessionInitializeTransaction(); puntuacionCAD = new PuntuacionCAD(session); puntuacionCEN = new PuntuacionCEN(puntuacionCAD); // Write here your custom transaction ... int id = puntuacionCEN.New_(id_usuario, puntuacion); puntuacionCAD.RelationerPuntuacionGymkana(id, id_evento); SessionCommit(); } catch (Exception ex) { SessionRollBack(); throw ex; } finally { SessionClose(); } return(result); /*PROTECTED REGION END*/ }
public PuntuacionCEN(IPuntuacionCAD _IPuntuacionCAD) { this._IPuntuacionCAD = _IPuntuacionCAD; }
public PuntuacionCEN() { this._IPuntuacionCAD = new PuntuacionCAD(); }