예제 #1
0
 public void AddUserFavorite(string userCode, string type, string pageName, string pageUrl, string pageImage, bool hasPermission)
 {
     if (TheFavoritesMgr.CheckFavoritesUniqueExist(userCode, type, pageName))
     {
         TheFavoritesMgr.DeleteFavorites(userCode, type, pageName);
     }
     if (hasPermission)
     {
         Favorites fav = new Favorites();
         fav.User      = TheUserMgr.LoadUser(userCode);
         fav.Type      = type;
         fav.PageName  = pageName;
         fav.PageUrl   = pageUrl;
         fav.PageImage = pageImage;
         TheFavoritesMgr.CreateFavorites(fav);
     }
 }
예제 #2
0
 public void DeleteUserFavorite(int id)
 {
     TheFavoritesMgr.DeleteFavorites(id);
 }