Пример #1
0
        public ActionResult GetTallies(string session_key, string vote_id)
        {
            string user_name = UserCenter.Act(session_key);

            if (user_name == null)
            {
                return(Json(new { code = ResultCode.InvalidSession }, JsonRequestBehavior.AllowGet));
            }

            IEnumerable <TallyInfo> tallies = TallyStore.GetTallies(vote_id, user_name);

            return(Json(new
            {
                code = ResultCode.Success,
                tallies = tallies,
            }, JsonRequestBehavior.AllowGet));
        }