예제 #1
0
        /// <summary>
        /// 取消关注的方法
        /// </summary>
        private void UnSubscribe()
        {
            UserInOrOut userInorOutModel = GetUserOutModel();

            UserInfo user = new UserInfo();
            user.openid = userInorOutModel.userId;

            UserInfoBll userBll = new UserInfoBll();
            DataTable userTable = userBll.GetUserTable(user);

            userInorOutModel.userName = userTable.Rows[0]["nickname"].ToString();
            userInorOutModel.groupID = userTable.Rows[0]["groupId"].ToString();
            userInorOutModel.groupName = userTable.Rows[0]["groupName"].ToString();
            UserInOrOutBll userInOrOutBll = new UserInOrOutBll();
            userInOrOutBll.Add(userInorOutModel);

            user = new UserInfo();
            user.openid = userInorOutModel.userId;
            userBll.Del(user);
        }
예제 #2
0
        /**********  事件处理方法 **************/
        /// <summary>
        /// 关注时候的操作
        /// </summary>
        private void Subscribe()
        {
            if (IsExistUser())
                return;
            UserInOrOut userInorOutModel = GetUserInModel();

            UserInfoBll userBll = new UserInfoBll();
            UserInfo user = userBll.GetUserInfo(userInorOutModel.userId);
            userInorOutModel.userName = user.nickname;

            UserInOrOutBll userInOrOutBll = new UserInOrOutBll();
            userInOrOutBll.Add(userInorOutModel);

            user = new UserInfo();
            user = userBll.GetUserInfo(userInorOutModel.userId);
            userBll.Add(user);
        }