MxWeiXinPF.Web/weixin/vote/index.aspx.cs
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using MxWeiXinPF.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MxWeiXinPF.Web.weixin.vote
{
public partial class index : WeiXinPage
{
protected Model.wx_vote_base baseinfo;
protected int toupNum = 0;
protected bool hasVoted = false;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
int wid = MyCommFun.RequestInt("wid");
string openid = MyCommFun.RequestOpenid();
int aid = MyCommFun.RequestInt("aid");
if (wid == 0 || openid == "" || aid == 0)
{
return;
}
BindData(wid, aid, openid);
}
}
public void BindData(int wid, int aid, string openid)
{
//基本表信息
BLL.wx_vote_base baseBll = new BLL.wx_vote_base();
List<Model.wx_vote_base> mlist = baseBll.GetModelList(string.Format(" id={0} and wid={1} ", aid, wid));
if (mlist.Count <= 0 || mlist == null)
{
return;
}
baseinfo = mlist[0];
//投票选项字符串设置
BLL.wx_vote_item itemBll = new BLL.wx_vote_item();
IList<Model.wx_vote_item> itemlist = itemBll.GetModelList("baseid=" + baseinfo.id);
if (itemlist == null || itemlist.Count <= 0)
{
return;
}
ItemListStr(itemlist, openid);
}
public void ItemListStr(IList<Model.wx_vote_item> itemlist, string openid)
{
toupNum = itemlist.Sum(i => i.tpTimes == null ? 0 : i.tpTimes).Value;
BLL.wx_vote_result retBll = new BLL.wx_vote_result();
IList<Model.wx_vote_result> retList = retBll.GetModelList("baseid=" + baseinfo.id);
//投票总数
后面还有 241 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
