Пример #1
0
        public MainController()
        {
            confirmService = new UserConfirmService();
            userService = new UserService();
            loginService = new LoginService();
            friendService = new FriendService();
            inviteService = new InviteService();

            HidePermission( typeof( SecurityController ) );
        }
Пример #2
0
        public WeiboRegisterController()
        {
            userService = new UserService();
            confirmService = new UserConfirmService();
            inviteService = new InviteService();
            loginService = new LoginService();
            friendService = new FriendService();

            appService = new UserAppService();
            menuService = new UserMenuService();
        }
Пример #3
0
        public RegisterController()
        {
            userService = new UserService();
            confirmService = new UserConfirmService();
            confirmEmail = new ConfirmEmail();
            loginService = new LoginService();

            appService = new UserAppService();
            menuService = new UserMenuService();

            inviteService = new InviteService();

            HidePermission( typeof( SecurityController ) );
        }
Пример #4
0
        // 根据邀请码注册,需要加为好友
        public static void ProcessFriend( User newRegUser, MvcContext ctx )
        {
            IInviteService inviteService = new InviteService();
            IFriendService friendService = new FriendService();

            int friendId = ctx.PostInt( "friendId" );
            if (friendId <= 0) return;

            String friendCode = ctx.Post( "friendCode" );

            Result result = inviteService.Validate( friendId, friendCode );
            if (result.HasErrors) return;

            friendService.AddInviteFriend( newRegUser, friendId );
        }
Пример #5
0
 public InviteFriendsJob()
 {
     userService = new UserService();
     inviteService = new InviteService();
 }
Пример #6
0
 public InviteController()
 {
     inviteService = new InviteService();
 }