Example #1
0
 public ActionResult AddMemberVote(MemberVote vm)
 {
     if (vm.AddMemberVote("1"))
     {
         return(Json(new { rescode = 200, msg = "" }));
     }
     else
     {
         return(Json(new { rescode = 500, msg = "操作失敗" }));
     }
 }
Example #2
0
        public ActionResult VoteMobelForShow(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 = "";

            ViewBag.vid = id;
            MemberVote mv = new MemberVote();

            mv.opts    = new List <VoteOption>();
            ViewBag.mv = mv;
            VoteBL v = VoteBL.GetVote(id);

            return(View(v));
        }
Example #3
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));
        }