public void ModificarGymkana(WhateverGenNHibernate.EN.Whatever.GymkanaEN gym) { /*PROTECTED REGION ID(WhateverGenNHibernate.CP.Whatever_Gymkana_modificarGymkana) ENABLED START*/ IGymkanaCAD gymkanaCAD = null; GymkanaCEN gymkanaCEN = null; try { SessionInitializeTransaction(); gymkanaCAD = new GymkanaCAD(session); gymkanaCEN = new GymkanaCEN(gymkanaCAD); gymkanaCAD.Modify(gym); SessionCommit(); } catch (Exception ex) { SessionRollBack(); throw ex; } finally { SessionClose(); } /*PROTECTED REGION END*/ }
public void BorrarGymkana(int p_oid) { /*PROTECTED REGION ID(WhateverGenNHibernate.CP.Whatever_Gymkana_borrarGymkana) ENABLED START*/ IGymkanaCAD gymkanaCAD = null; GymkanaCEN gymkanaCEN = null; try { SessionInitializeTransaction(); gymkanaCAD = new GymkanaCAD(session); gymkanaCEN = new GymkanaCEN(gymkanaCAD); System.Collections.Generic.IList <PasoEN> pasos; PasoCAD paso = new PasoCAD(session); MapaCP mapa = new MapaCP(session); PuntuacionCP punt = new PuntuacionCP(session); ReporteCP rep = new ReporteCP(session); ComentarioCP com = new ComentarioCP(session); punt.BorrarPuntuacionGymkana(p_oid); rep.BorrarReportesGymkana(p_oid); com.BorrarComentariosGymkana(p_oid); pasos = paso.FiltrarPasoPorGymkana(p_oid); foreach (PasoEN element in pasos) { mapa.BorrarMapaParaPaso(element.ID); paso.Destroy(element.ID); } gymkanaCAD.Destroy(p_oid); SessionCommit(); } catch (Exception ex) { SessionRollBack(); throw ex; } finally { SessionClose(); } /*PROTECTED REGION END*/ }
public void CrearGymkana(WhateverGenNHibernate.EN.Whatever.GymkanaEN gym, string lat, string lon, int zoom) { /*PROTECTED REGION ID(WhateverGenNHibernate.CP.Whatever_Gymkana_crearGymkana) ENABLED START*/ IGymkanaCAD gymkanaCAD = null; GymkanaCEN gymkanaCEN = null; try { SessionInitializeTransaction(); gymkanaCAD = new GymkanaCAD(session); gymkanaCEN = new GymkanaCEN(gymkanaCAD); MapaCP mapa = new MapaCP(session); PasoEN paso = new PasoEN(); MapaEN mapen = new MapaEN(); paso.Descripcion = gym.Descripcion; mapen.Latitud = lat; mapen.Longitud = lon; mapen.Zoom = zoom; gym.NumPasos = 1; int id_gym = gymkanaCAD.New_(gym); AnadirPaso(paso, mapen, gym); SessionCommit(); } catch (Exception ex) { SessionRollBack(); throw ex; } finally { SessionClose(); } /*PROTECTED REGION END*/ }
public System.Collections.Generic.IList <WhateverGenNHibernate.EN.Whatever.PasoEN> VerPasos(int p_oid) { /*PROTECTED REGION ID(WhateverGenNHibernate.CP.Whatever_Gymkana_verPasos) ENABLED START*/ IGymkanaCAD gymkanaCAD = null; GymkanaCEN gymkanaCEN = null; System.Collections.Generic.IList <WhateverGenNHibernate.EN.Whatever.PasoEN> result = null; try { SessionInitializeTransaction(); gymkanaCAD = new GymkanaCAD(session); gymkanaCEN = new GymkanaCEN(gymkanaCAD); PasoCEN paso = new PasoCEN(); System.Collections.Generic.IList <PasoEN> pasos; pasos = paso.VerPasos(p_oid); SessionCommit(); return(pasos); } catch (Exception ex) { SessionRollBack(); throw ex; } finally { SessionClose(); } return(result); /*PROTECTED REGION END*/ }
public void AnadirPaso(WhateverGenNHibernate.EN.Whatever.PasoEN paso, WhateverGenNHibernate.EN.Whatever.MapaEN mapa, WhateverGenNHibernate.EN.Whatever.GymkanaEN gym) { /*PROTECTED REGION ID(WhateverGenNHibernate.CP.Whatever_Gymkana_anadirPaso) ENABLED START*/ IGymkanaCAD gymkanaCAD = null; GymkanaCEN gymkanaCEN = null; try { SessionInitializeTransaction(); gymkanaCAD = new GymkanaCAD(session); gymkanaCEN = new GymkanaCEN(gymkanaCAD); PasoCAD paso2 = new PasoCAD(session); MapaCP mapa2 = new MapaCP(session); paso.Gymkana = gym; int id_paso = paso2.New_(paso); mapa2.CrearMapaParaPaso(id_paso, mapa.Latitud, mapa.Longitud, mapa.Zoom); gym.NumPasos = gym.NumPasos + 1; SessionCommit(); } catch (Exception ex) { SessionRollBack(); throw ex; } finally { SessionClose(); } /*PROTECTED REGION END*/ }
public GymkanaCEN(IGymkanaCAD _IGymkanaCAD) { this._IGymkanaCAD = _IGymkanaCAD; }
public GymkanaCEN() { this._IGymkanaCAD = new GymkanaCAD(); }