public FriendController() { friendService = new FriendService(); userService = new UserService(); followService = new FollowerService(); blacklistService = new BlacklistService(); }
public MsgController() { msgService = new MessageService(); blacklistService = new BlacklistService(); userService = new UserService(); attachmentService = new MessageAttachmentService(); }
public FriendController() { followService = new FollowerService(); friendService = new FriendService(); userService = new UserService(); blacklistService = new BlacklistService(); LayoutControllerType = typeof( MicroblogController ); }
public virtual Result CanAddFriend(long userId, long targetId) { Result result = new Result(); if (userId <= 0) { result.Add(lang.get("exPlsLogin")); return(result); } if (userId == targetId) { result.Add(lang.get("exFriendSelf")); return(result); } User f = userService.GetById(targetId); if (f == null) { result.Add(lang.get("exUser")); return(result); } BlacklistService blacklistService = new BlacklistService(); if (blacklistService.IsBlack(targetId, userId)) { result.Add(lang.get("blackFriend")); } else if (IsFriend(userId, targetId)) { result.Add(lang.get("exFriendBeen")); } else if (IsWaitingFriendApproving(userId, targetId)) { result.Add(lang.get("inApproveFriend")); } return(result); }
public Result CanAddFriend( int userId, int targetId ) { Result result = new Result(); if (userId <= 0) { result.Add( lang.get( "exPlsLogin" ) ); return result; } if (userId == targetId) { result.Add( lang.get( "exFriendSelf" ) ); return result; } User f = userService.GetById( targetId ); if (f == null) { result.Add( lang.get( "exUser" ) ); return result; } BlacklistService blacklistService = new BlacklistService(); if (blacklistService.IsBlack( targetId, userId )) { result.Add( lang.get( "blackFriend" ) ); } else if (IsFriend( userId, targetId )) { result.Add( lang.get( "exFriendBeen" ) ); } else if (IsWaitingFriendApproving( userId, targetId )) { result.Add( lang.get( "inApproveFriend" ) ); } return result; }
public FeedbackController() { feedbackService = new FeedbackService(); blacklistService = new BlacklistService(); }
public VisitorController() { visitorService = new wojilu.Common.Visitors.VisitorService(); blacklistService = new BlacklistService(); }
public MessageService() { blacklistService = new BlacklistService(); }
public BlacklistController() { base.LayoutControllerType = typeof( FriendController ); blacklistService = new BlacklistService(); }