Example #1
0
        public IActionResult CreateKeyword(KeywordContract request)
        {
            var client = GetCodeListClient();
            var newId  = client.CreateKeyword(request);

            return(Json(newId));
        }
Example #2
0
 public IActionResult UpdateKeyword(int keywordId, [FromBody] KeywordContract data)
 {
     try
     {
         m_catalogValueManager.UpdateKeyword(keywordId, data);
         return(Ok());
     }
     catch (HttpErrorCodeException exception)
     {
         return(StatusCode((int)exception.StatusCode, exception.Message));
     }
 }
Example #3
0
        public void UpdateKeyword(int keywordId, KeywordContract data)
        {
            try
            {
                m_client.Put <HttpStatusCode>($"keyword/{keywordId}", data);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }
Example #4
0
        public int CreateKeyword(KeywordContract keyword)
        {
            try
            {
                var newId = m_client.Post <int>("keyword", keyword);
                return(newId);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }
Example #5
0
        public int CreateKeyword([FromBody] KeywordContract data)
        {
            var resultId = m_catalogValueManager.CreateKeyword(data.Name);

            return(resultId);
        }
Example #6
0
 public void UpdateKeyword(int keywordId, KeywordContract data)
 {
     new CreateOrUpdateKeywordWork(m_catalogValueRepository, keywordId, data.Name).Execute();
 }
Example #7
0
        public void RenameKeyword(int keywordId, KeywordContract request)
        {
            var client = GetCodeListClient();

            client.UpdateKeyword(keywordId, request);
        }