예제 #1
0
        public ActionResult ShowNoticeReg(string id)
        {
            string code = Request.QueryString["code"];

            QYConfig.RegistWX();
            var             accessToken = AccessTokenContainer.GetToken(QYConfig.CorpId);
            GetUserIdResult user        = OAuth2Api.GetUserId(accessToken, code, QYConfig.VoteAgenID);
            QYMemberBL      member      = QYMemberBL.GetMemberByWXID(user.UserId);
            NoticeBL        n           = NoticeBL.CreateNotice(id);

            if (n != null && member != null)
            {
                member.ReadNotice(id);
            }
            return(View(n));
        }
예제 #2
0
        public ActionResult VoteMobel(string id)
        {
            string code = Request.QueryString["code"];

            QYConfig.RegistWX();
            var             accessToken = AccessTokenContainer.GetToken(QYConfig.CorpId);
            GetUserIdResult user        = OAuth2Api.GetUserId(accessToken, code, QYConfig.VoteAgenID);
            QYMemberBL      member      = QYMemberBL.GetMemberByWXID(user.UserId);

            ViewBag.userid = member.ID;

            ViewBag.vid = id;
            MemberVote mv = new MemberVote(member.ID.ToString(), id);

            ViewBag.mv = mv;
            VoteBL v = VoteBL.GetVote(id);

            return(View(v));
        }