public void BorrarEvento(int p_oid)
        {
            /*PROTECTED REGION ID(WhateverGenNHibernate.CEN.Whatever_Evento_borrarEvento) ENABLED START*/

            // Write here your custom code...
            MapaCAD       mapa = new MapaCAD();
            PuntuacionCAD punt = new PuntuacionCAD();
            ReporteCAD    rep  = new ReporteCAD();

            System.Collections.Generic.IList <MapaEN>       mapas;
            System.Collections.Generic.IList <PuntuacionEN> puntos;
            System.Collections.Generic.IList <ReporteEN>    reportes;

            Destroy(p_oid);

            mapas = mapa.FiltrarPorEvento(p_oid);
            mapa.Destroy(mapas [0].Id);

            puntos = punt.FiltrarTodosEventos(p_oid);
            foreach (PuntuacionEN element in puntos)
            {
                punt.Destroy(element.Id);
            }

            reportes = rep.FiltrarTodosEventos(p_oid);
            foreach (ReporteEN element in reportes)
            {
                rep.Destroy(element.ID);
            }



            /*PROTECTED REGION END*/
        }
        public void BorrarEvento(int p_oid)
        {
            /*PROTECTED REGION ID(WhateverGenNHibernate.CP.Whatever_Admin_borrarEvento) ENABLED START*/

            IAdminCAD adminCAD = null;
            AdminCEN  adminCEN = null;



            try
            {
                SessionInitializeTransaction();
                adminCAD = new AdminCAD(session);
                adminCEN = new  AdminCEN(adminCAD);



                EventoCAD evento = new EventoCAD(session);
                MapaCAD   mapa   = new MapaCAD(session);

                System.Collections.Generic.IList <MapaEN> aux;
                aux = mapa.FiltrarPorEvento(p_oid);
                int id_mapa = -1;

                foreach (MapaEN element in aux)
                {
                    id_mapa = element.Id;
                    mapa.Destroy(id_mapa);
                }


                evento.Destroy(p_oid);



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


            /*PROTECTED REGION END*/
        }
        public void BorrarPaso(int p_oid)
        {
            /*PROTECTED REGION ID(WhateverGenNHibernate.CEN.Whatever_Paso_borrarPaso) ENABLED START*/


            PasoEN  paso = new PasoEN();
            MapaCAD mapa = new MapaCAD();

            System.Collections.Generic.IList <MapaEN> mapas;
            paso = GetID(p_oid);
            Destroy(p_oid);
            mapas = mapa.FiltrarPorPaso(p_oid);
            mapa.Destroy(mapas [0].Id);

            /*PROTECTED REGION END*/
        }
        public void BorrarMapaParaPaso(int id_paso)
        {
            /*PROTECTED REGION ID(WhateverGenNHibernate.CP.Whatever_Mapa_borrarMapaParaPaso) ENABLED START*/

            IMapaCAD mapaCAD = null;
            MapaCEN  mapaCEN = null;



            try
            {
                SessionInitializeTransaction();
                mapaCAD = new MapaCAD(session);
                mapaCEN = new  MapaCEN(mapaCAD);



                // Write here your custom transaction ...

                MapaEN mapen = new MapaEN();
                mapen = mapaCAD.FiltrarMapaPorPaso(id_paso);
                mapaCAD.UnrelationerMapaPaso(mapen.Id, id_paso);
                mapaCAD.Destroy(mapen.Id);


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


            /*PROTECTED REGION END*/
        }