Exemple #1
0
        public ActionResult GetVoteMemberByType(string vid, string vtype)
        {
            VoteBL v = VoteBL.GetVote(vid);

            if (!string.IsNullOrEmpty(vtype) && vtype != "ALL")
            {
                v.VoteMember = v.VoteMember.Where(p => p.OptionTitle == vtype).ToList();
            }
            VoteMemberlistVM ms = new VoteMemberlistVM();

            ms.total = v.VoteMember.Count;
            VoteMemberVM m;

            ms.rows = new List <VoteMemberVM>();
            for (int i = 0; i < v.VoteMember.Count; i++)
            {
                m         = new VoteMemberVM();
                m.name    = "<img src='" + v.VoteMember[i].Avatar + "' />" + v.VoteMember[i].Name;
                m.title   = v.VoteMember[i].OptionTitle;
                m.context = v.VoteMember[i].OptinContext;
                m.picurl  = v.VoteMember[i].Avatar;
                ms.rows.Add(m);
            }
            return(Json(ms));
        }
Exemple #2
0
        public ActionResult GetVoteMember(string id)
        {
            VoteBL           v  = VoteBL.GetVote(id);
            VoteMemberlistVM ms = new VoteMemberlistVM();

            ms.total = v.VoteMember.Count;
            VoteMemberVM m;

            ms.rows = new List <VoteMemberVM>();
            for (int i = 0; i < v.VoteMember.Count; i++)
            {
                m         = new VoteMemberVM();
                m.name    = "<img style='width:30px' src='" + v.VoteMember[i].Avatar + "' />" + v.VoteMember[i].Name;
                m.title   = v.VoteMember[i].OptionTitle;
                m.context = v.VoteMember[i].OptinContext;
                m.picurl  = v.VoteMember[i].Avatar;
                ms.rows.Add(m);
            }
            return(Json(ms));
        }