Beispiel #1
0
        public bool Insert(ConfigTagEntity entity)
        {
            _ConfigTagCrud.Insert(entity);
            if (entity.Id > 0)
            {
                LanguageLogic          _LanguageLogic          = new LanguageLogic();
                ConfigTagLanguageLogic _ConfigTagLanguageLogic = new ConfigTagLanguageLogic();

                List <LanguageEntity> listLanguages = _LanguageLogic.SelectAll();
                if (listLanguages != null && listLanguages.Count > 0)
                {
                    foreach (LanguageEntity languageEntity in listLanguages)
                    {
                        ConfigTagLanguageEntity configTagLanguageEntity = new ConfigTagLanguageEntity();
                        configTagLanguageEntity.Id_configTag = entity.Id;
                        configTagLanguageEntity.Id_language  = languageEntity.Id;
                        configTagLanguageEntity.Value_tag    = string.Empty;
                        _ConfigTagLanguageLogic.Insert(configTagLanguageEntity);
                    }
                    return(true);
                }
                else
                {
                    return(true);
                }
            }
            else
            {
                return(false);
            }
        }
 public async Task <HttpResponseMessage> Update(ConfigTagLanguageEntity entity)
 {
     try
     {
         HttpResponseMessage response;
         _ConfigTagLanguageLogic.Update(entity);
         response = Request.CreateResponse(HttpStatusCode.OK, true);
         return(response);
     }
     catch (Exception ex)
     {
         throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "Error al actualizar la etiqueta"));
     }
 }
 public bool Update(ConfigTagLanguageEntity entity)
 {
     _ConfigTagLanguageCrud.Update(entity);
     return(true);
 }
 public bool Insert(ConfigTagLanguageEntity entity)
 {
     _ConfigTagLanguageCrud.Insert(entity);
     return(true);
 }