Esempio n. 1
0
        public ActionResult GetTotals(string vote_id)
        {
            IEnumerable <TallyInfo> totals = TotalStore.GetTotals(vote_id);

            return(Json(new
            {
                code = ResultCode.Success,
                totals = totals,
            }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public override void ExecuteResult(ControllerContext context)
        {
            TextWriter writer = context.HttpContext.Response.Output;

            IEnumerable <TallyInfo> totals = TotalStore.GetTotals(this.voteId);

            string output = JsonConvert.SerializeObject(totals);

            writer.Write(output);
        }