Ejemplo n.º 1
0
        public BE.Idioma ObtnerIdiomaPorNombre(string nombreIdioma)
        {
            BLL.Leyenda bllLeyenda = new BLL.Leyenda();
            BE.Idioma   beIdioma   = _dalManagerIdioma.ObtenerIdiomaPorNombre(nombreIdioma);

            beIdioma.Leyendas = bllLeyenda.ObtenerLeyendasPorIdIdioma(beIdioma.Id) ?? bllLeyenda.ObtenerLeyendas();

            return(beIdioma);
        }
Ejemplo n.º 2
0
        public BE.Idioma ObtenerIdiomaDeUsuario(int idUsuario)
        {
            BLL.Leyenda bllLeyenda = new BLL.Leyenda();
            BE.Idioma   beIdioma   = _dalManagerIdioma.ObtenerIdiomaDeUsuario(idUsuario);

            beIdioma.Leyendas = bllLeyenda.ObtenerLeyendasPorIdIdioma(beIdioma.Id);

            return(beIdioma);
        }
Ejemplo n.º 3
0
        public List <BE.Idioma> ObtenerIdiomas()
        {
            BLL.Leyenda      bllLeyenda = new BLL.Leyenda();
            List <BE.Idioma> lstIdiomas = _dalManagerIdioma.Leer();

            foreach (BE.Idioma idioma in lstIdiomas)
            {
                idioma.Leyendas = bllLeyenda.ObtenerLeyendasPorIdIdioma(idioma.Id) ?? bllLeyenda.ObtenerLeyendas();
            }

            return(lstIdiomas);
        }
Ejemplo n.º 4
0
        public Resultado Editar(BE.Idioma pIdioma)
        {
            try
            {
                BLL.Leyenda    bllLeyenda    = new BLL.Leyenda();
                BLL.Traduccion bllTraduccion = new BLL.Traduccion();

                foreach (BE.Leyenda leyenda in pIdioma.Leyendas)
                {
                    bllTraduccion.Editar(leyenda.Traduccion);
                }

                return(new Resultado(false, "Ok"));
            }
            catch (Exception e)
            {
                Logger.Log.Error("No se pudo editar el Idioma.", e);
                return(new Resultado(false, "No se pudo editar el Idioma."));
            }
        }