/// <summary> /// 查看单个通告(根据标题) /// </summary> /// <returns></returns> public List <Message> LookSingleMessage(string msgTitle) { try { string sqlWhere = string.Format(" and msgTitle= '{0}'", msgTitle); List <Message> list = MessageAccess.SelectSingleMessage(sqlWhere); if (list != null && list.Count > 0) { return(list); } return(null); } catch (Exception ex) { return(null); } }
/// <summary> /// 查看单个通告(根据ID) /// </summary> /// <returns></returns> public Message ShowSingleMessage(int msgID) { try { string sqlWhere = string.Format(" and msgId= {0}", msgID); List <Message> list = MessageAccess.SelectSingleMessage(sqlWhere); if (list != null && list.Count > 0) { return(list[0]); } return(null); } catch (Exception ex) { return(null); } }