public void AddUrl(string url, int depth) { LinkDAL dalLink = new LinkDAL(); if (!dalLink.SelectExistByUrl(url)) { Link link = new Link(); link.Url = url; link.Depth = depth; link.Status = Link.StatusAttribute.IsUse; link.CreateTime = DateTime.Now; link.UpdateTime = DateTime.Now; link.IsDownload = false; int insertId = dalLink.Insert(link); link.Id = insertId; } }
public bool SelectExistByUrl(string url) { LinkDAL dalLink = new LinkDAL(); return(dalLink.SelectExistByUrl(url)); }