Exemplo n.º 1
0
        } // getNewsChannel

        /// <summary>
        /// Get rss2 Item Code
        /// </summary>
        /// <param name="xmlCode">xml</param>
        /// <param name="thisChannel">channel</param>
        /// <returns>rss item code</returns>
        public StringBuilder Get_rss2ItemCode(StringBuilder xmlCode, MNewsChannel thisChannel)
        {
            if (this != null)           //	never null ??
            {
                xmlCode.Append("<item>");
                xmlCode.Append("<CM_NewsItem_ID>" + this.Get_ID() + "</CM_NewsItem_ID>");
                xmlCode.Append("  <title><![CDATA["
                               + this.GetTitle() + "]]></title>");
                xmlCode.Append("  <description><![CDATA["
                               + this.GetDescription()
                               + "]]></description>");
                xmlCode.Append("  <content><![CDATA["
                               + this.GetContentHTML()
                               + "]]></content>");
                xmlCode.Append("  <link>"
                               + thisChannel.GetLink()
                               + "?CM_NewsItem_ID=" + this.Get_ID() + "</link>");
                xmlCode.Append("  <author><![CDATA["
                               + this.GetAuthor() + "]]></author>");
                xmlCode.Append("  <pubDate>"
                               + this.GetPubDate() + "</pubDate>");
                xmlCode.Append("</item>");
            }
            return(xmlCode);
        }
Exemplo n.º 2
0
 /// <summary>
 /// getNewsChannel
 /// </summary>
 /// <returns>news Chennel</returns>
 public MNewsChannel GetNewsChannel()
 {
     int[] thisNewsChannel = MNewsChannel.GetAllIDs("CM_NewsChannel", "CM_NewsChannel_ID=" + this.GetCM_NewsChannel_ID(), Get_TrxName());
     if (thisNewsChannel != null)
     {
         if (thisNewsChannel.Length == 1)
         {
             return(new MNewsChannel(GetCtx(), thisNewsChannel[0], Get_TrxName()));
         }
     }
     return(null);
 } // getNewsChannel