Example #1
0
 public void BindData(int wid, int aid, string openid)
 {
     //基本表信息
     BLL.wx_vote_base baseBll = new BLL.wx_vote_base();
     baseinfo = baseBll.GetModel(aid);
     if (baseinfo == null)
     {
         return;
     }
     //投票选项字符串设置\
     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);
 }
Example #2
0
        public void BindData(int wid, int aid, string openid)
        {
            //基本表信息
            BLL.wx_vote_base baseBll = new BLL.wx_vote_base();
            baseinfo = baseBll.GetModel(aid);
            if (baseinfo == null)
            {
                return;
            }
            //投票选项字符串设置\
            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);
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="source"></param>
 /// <param name="e"></param>
 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     switch (e.CommandName)
     {
     case "end":
     {
         int id = int.Parse(e.CommandArgument.ToString());
         Model.wx_vote_base baseinfo = gbll.GetModel(id);
         if (baseinfo.endTime <= DateTime.Now)
         {
         }
         else
         {
             gbll.UpdateField(id, "endTime='" + DateTime.Now + "'");
         }
     }
     break;
     }
     JscriptMsg("操作成功", Utils.CombUrlTxt("vote_list.aspx", "typeid={0}&keywords={1}", ddlProperty.SelectedValue, this.txtKeywords.Text), "Success");
 }