public NewsItem GetNews(int id) { NewsItem item =null; try { News dao = new News(); item = dao.GetByID(id); } catch { } return item; }
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; }