コード例 #1
0
        public void BorrarEvento(int p_oid)
        {
            /*PROTECTED REGION ID(WhateverGenNHibernate.CEN.Whatever_Admin_borrarEvento) ENABLED START*/

            // Write here your custom code...
            EventoCEN evento = new EventoCEN();
            MapaCEN   mapa   = new MapaCEN();

            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);
            /*PROTECTED REGION END*/
        }
コード例 #2
0
        public void AnadirPaso(int id_gym, string descripcion, int latitud, int longitud, int zoom)
        {
            /*PROTECTED REGION ID(WhateverGenNHibernate.CEN.Whatever_Gymkana_anadirPaso) ENABLED START*/

            // Write here your custom code...

            PasoCEN paso = new PasoCEN();
            MapaCEN mapa = new MapaCEN();
            int     aux  = -1;
            int     aux2 = -1;

            System.Collections.Generic.IList <PasoEN> pasos;
            pasos = paso.GetAll(0, 0);
            aux   = pasos [pasos.Count - 1].ID;
            paso.New_(descripcion, aux + 1, id_gym);

            System.Collections.Generic.IList <MapaEN> mapas;
            mapas = mapa.GetAll(0, 0);

            aux2 = mapas [mapas.Count - 1].Id;
            mapa.New_(id_gym, aux2 + 1, aux + 1, latitud, longitud, zoom);
            /*PROTECTED REGION END*/
        }