Ejemplo n.º 1
0
        public List <Translation> GetTranslations(int languageId)
        {
            TranslationMapper translationMapper = new TranslationMapper();
            // LabelMapper labelMapper = new LabelMapper();
            List <Translation> translations = translationMapper.Get(languageId);

            //List<Label> labels = labelMapper.Get();


            if (translations == null)
            {
                AddError(new ResultBE(ResultBE.Type.NULL, "No existen traducciones"));
                return(null);
            }

            return(translations);
        }
Ejemplo n.º 2
0
        public bool Save(Language language)
        {
            LanguageMapper    languageMapper    = new LanguageMapper();
            TranslationMapper translationMapper = new TranslationMapper();

            if (!IsValid(language))
            {
                return(false);
            }

            if (!languageMapper.Save(language))
            {
                AddError(new ResultBE(ResultBE.Type.FAIL, "Error al grabar"));
                return(false);
            }

            if (!translationMapper.Save(language))
            {
                AddError(new ResultBE(ResultBE.Type.FAIL, "Error al grabar"));
                return(false);
            }

            return(true);
        }
Ejemplo n.º 3
0
 public TranslationCrudFactory() : base()
 {
     mapper = new TranslationMapper();
     dao    = SqlDao.GetInstance();
 }