Exemplo n.º 1
0
        public bool Delete(string idRCasilla)
        {
            bool Result   = false;
            var  registro = RetrieveByIdRCasilla(idRCasilla);

            if (registro != null)
            {
                using (var r = new Repositorio <RCasilla>())
                {
                    Result = r.Delete(registro);
                }
            }
            else
            {
                throw (new Exception("El Registro no existe"));
            }

            return(Result);
        }
Exemplo n.º 2
0
        public bool Delete(string idSeccion)
        {
            bool Result  = false;
            var  seccion = RetrieveByIdSeccion(idSeccion);

            if (seccion != null)
            {
                using (var r = new Repositorio <Seccione>())
                {
                    Result = r.Delete(seccion);
                }
            }
            else
            {
                throw (new Exception("La sección no existe"));
            }

            return(Result);
        }
Exemplo n.º 3
0
        public bool Delete(int idMunicipio)
        {
            bool Result    = false;
            var  municipio = RetrieveByIdMunicipio(idMunicipio);

            if (municipio != null)
            {
                using (var r = new Repositorio <Municipio>())
                {
                    Result = r.Delete(municipio);
                }
            }
            else
            {
                throw (new Exception("El Municipio no existe"));
            }

            return(Result);
        }
Exemplo n.º 4
0
        public bool Delete(string idUsuario)
        {
            bool Result  = false;
            var  usuario = RetrieveByIdUsuario(idUsuario);

            if (usuario != null)
            {
                using (var r = new Repositorio <Usuario>())
                {
                    Result = r.Delete(usuario);
                }
            }
            else
            {
                throw (new Exception("El Usuario no existe"));
            }

            return(Result);
        }