/// <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)); }
/// <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)); }