コード例 #1
0
ファイル: SitecoreClient.cs プロジェクト: jayasimhas/Suseela
 public static void SaveArticleText(string articleNumber, string text, ArticleStruct articleStruct)
 {
     TimezoneUtil.ConvertArticleDatesToServerTimezone(articleStruct);
     using (var client = new HttpClient(_handler, false))
     {
         var article = new SaveArticleText()
         {
             ArticleNumber = articleNumber, ArticleData = articleStruct, WordText = text
         };
         var response = client.PostAsJsonAsync($"{$"{Constants.EDITOR_ENVIRONMENT_SERVERURL}" + "/api/"}SaveArticleText", article).Result;
         TimezoneUtil.ConvertArticleDatesToLocalTimezone(articleStruct);
     }
 }
コード例 #2
0
        public void Post([FromBody] SaveArticleText content)
        {
            ArticleItem article = _articleUtil.GetArticleByNumber(content.ArticleNumber);

            _sitecoreSaverUtil.SaveArticleDetailsAndText(article, content.WordText, content.ArticleData);
        }