Exemplo n.º 1
0
        public bool AddHyperlink(string topic, string url, string description, string phraseList)
        {
            HyperlinkItem item = new HyperlinkItem(phraseList);

            item.Description = description;
            item.Topic       = topic;
            item.Url         = url;

            return(AddHyperlink(item));
        }
Exemplo n.º 2
0
 public bool UpdateHyperlink(HyperlinkItem hyperlink)
 {
     if (string.IsNullOrEmpty(hyperlink.Topic) || string.IsNullOrEmpty(hyperlink.Url) || string.IsNullOrEmpty(hyperlink.DelimitedKeyPhraseList))
     {
         return(false);
     }
     else
     {
         EnsureState();
         keyPhraseLibrary.AddKeyPhrases(hyperlink.DelimitedKeyPhraseList);
         repository.SaveKeyPhrases(keyPhraseLibrary.DelimitKeyPhraseList());
         repository.SaveHyperlink(hyperlink);
         RefreshHyperlinks();
         this.selectedHyperlink = this.HyperlinkList.Where(r => r.Id == hyperlink.Id).SingleOrDefault();
         return(true);
     }
 }