public void AddFriend(int friendID) { UserFriend.Insert(this.UserID, friendID, DateTime.Now); UserBR.AddUserAlertMessage(friendID, Incremental.Kick.Common.Enums.AlertMessageEnum.NewFriendRequest); UserCache.RemoveUser(this.UserID); UserCache.RemoveUser(friendID); }
public void RemoveFriend(int friendID) { Query query = new Query(UserFriend.Schema).WHERE(UserFriend.Columns.UserID, this.UserID).AND(UserFriend.Columns.FriendID, friendID); UserFriend friend = new UserFriend(); friend.LoadAndCloseReader(UserFriend.FetchByQuery(query)); UserFriend.Destroy(friend.UserFriendID); UserCache.RemoveUser(this.UserID); UserCache.RemoveUser(friendID); }
public void Insert(int UserID, int FriendID, DateTime CreatedOn) { UserFriend item = new UserFriend(); item.UserID = UserID; item.FriendID = FriendID; item.CreatedOn = CreatedOn; item.Save(UserName); }
public bool Destroy(object UserFriendID) { return(UserFriend.Destroy(UserFriendID) == 1); }
public bool Delete(object UserFriendID) { return(UserFriend.Delete(UserFriendID) == 1); }