예제 #1
0
파일: UrlBLL.cs 프로젝트: nik2011/NikTest
        /// <summary>
        /// 获取未使用链接列表
        /// </summary>
        /// <param name="host"></param>
        /// <param name="depth"></param>
        /// <returns></returns>
        public static List <UrlEntity> GetList(string host)
        {
            string where = "isUser=0";
            if (!string.IsNullOrEmpty(host))
            {
                where += string.Format(" and [Host]='{0}' ", host);
            }

            return(UrlDAL.Search(where, "Id", 0));
        }
예제 #2
0
파일: UrlBLL.cs 프로젝트: nik2011/NikTest
 /// <summary>
 /// 获取链接列表
 /// </summary>
 /// <param name="host"></param>
 /// <param name="depth"></param>
 /// <returns></returns>
 public static List <UrlEntity> GetList(string host, int depth)
 {
     string where = string.Empty;
     if (!string.IsNullOrEmpty(host))
     {
         where += string.Format("[Host]='{0}' and ", host);
     }
     if (depth > 0)
     {
         where += string.Format("[Depth]={0} and ", depth);
     }
     if (!string.IsNullOrEmpty(where))
     {
         where = where.Remove(where.Length - 4, 4);
     }
     return(UrlDAL.Search(where, "Id", 0));
 }