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); }
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); }
public TranslationCrudFactory() : base() { mapper = new TranslationMapper(); dao = SqlDao.GetInstance(); }