Esempio n. 1
0
        public NewsItem GetNews(int id)
        {
            NewsItem item =null;

            try
            {
                News dao = new News();
                item = dao.GetByID(id);
            }
            catch { }

            return item;
        }
Esempio n. 2
0
        public string GetNewsText(int id)
        {
            string result = string.Empty;

            try
            {
                News dao = new News();
                NewsItem item = dao.GetByID(id);
                if (item != null && !string.IsNullOrEmpty(item.Text))
                {
                    result = item.Text;
                }
            }
            catch { }

            return result;
        }