Exemple #1
0
        /// <summary>
        /// 书签
        /// </summary>
        public bool BookMarkManage(string url, string title, long userId)
        {
            var sbDal   = new sys_bookmark_dal();
            var oldBook = sbDal.GetSingBook(url, userId);

            if (oldBook == null)
            {
                oldBook                = new sys_bookmark();
                oldBook.id             = sbDal.GetNextIdCom();
                oldBook.create_time    = Tools.Date.DateHelper.ToUniversalTimeStamp(DateTime.Now);
                oldBook.create_user_id = userId;
                oldBook.url            = url;
                oldBook.title          = title;
                sbDal.Insert(oldBook);
            }
            else
            {
                return(sbDal.DeleteBook(oldBook.id.ToString(), userId));
            }
            return(true);
        }
Exemple #2
0
        /// <summary>
        /// 删除该用户下的所有书签
        /// </summary>
        public bool DeleteAllBook(long userId)
        {
            var sbDal = new sys_bookmark_dal();

            return(sbDal.DeleteBook(userId));
        }
Exemple #3
0
        /// <summary>
        /// 根据Ids 删除相关书签
        /// </summary>
        public bool DeleteBookByIds(string ids, long userId)
        {
            var sbDal = new sys_bookmark_dal();

            return(sbDal.DeleteBook(ids, userId));
        }