private void CheckFavorite(FavoriteType favoriteType, int id, string favoriteName) { if (this.config.Maxfavorites <= Favorite.SearchCount(this.userid, null, favoriteType)) { base.AddErrLine("您收藏的" + favoriteName + "数目已经达到系统设置的数目上限"); return; } if (Favorite.SearchCount(this.userid, new Int32[] { id }, favoriteType) > 0) { base.AddErrLine("您过去已经收藏过该" + favoriteName); return; } if (Favorite.Create(this.userid, id, favoriteType) != null) { base.AddMsgLine("指定" + favoriteName + "已成功添加到收藏夹中"); base.SetUrl(this.referer); base.SetMetaRefresh(); base.SetShowBackLink(false); } }