コード例 #1
0
        /// <summary>
        /// 根据类型名查询单篇文章内容
        /// </summary>
        /// <param name="typeName"></param>
        /// <returns></returns>
        public static List <Info> GetInfobyName(string typeName)
        {
            string sql = "select top 1 * from Info where TypeName='" + typeName + "'";

            return(InfoDal.GetInfo(sql));
        }
コード例 #2
0
        /// <summary>
        /// 查询单篇文章内容
        /// </summary>
        /// <param name="infoId"></param>
        /// <returns></returns>
        public static List <Info> GetInfobyId(int infoId)
        {
            string sql = "select * from Info where InfoId=" + infoId;

            return(InfoDal.GetInfo(sql));
        }