示例#1
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();

            //判断是否已经设置了微留言基本信息
            BLL.wx_sjb_qiudui sbll = new BLL.wx_sjb_qiudui();


            _strWhere        = "wid=" + weixin.id + " " + _strWhere;
            this.page        = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            // DataSet ds = gbll.GetList( _strWhere);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;

                int count = ds.Tables[0].Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    dr = ds.Tables[0].Rows[i];
                }
                ds.AcceptChanges();
            }
            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("qiudui_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
        protected void save_qiudui_Click(object sender, EventArgs e)
        {

           //结果
            if (this.resultType.SelectedValue == null || this.resultType.SelectedValue.Trim().Length <= 0)
            {
                JscriptMsg("必须选择一个结果!", "back", "Error");
                return;
            }
            int resultType = Convert.ToInt32( this.resultType.SelectedValue);
            bisai = bisaibll.GetModel(bisaiid);
            if (bisai.resultType != null && bisai.resultType.ToString().Length > 0)
            {
                return;         
            }
            bisaibll.Updatejg(bisaiid, resultType);


            //修改wx_sjb_jcDetail
            BLL.wx_sjb_jcDetail yonghu = new BLL.wx_sjb_jcDetail();
            yonghu.UpdateDetail(richengid, bisaiid, resultType);



            //修改wx_sjb_users
            BLL.wx_sjb_users uerbll = new BLL.wx_sjb_users();
            uerbll.UpdateField(bisaiid,resultType);//成功个数
            uerbll.UpdateField1(bisaiid, resultType);//成功个数

            //修改wx_sjb_qiudui
            bisai = bisaibll.GetModel(bisaiid);

            //修改球队的基本表
            BLL.wx_sjb_qiudui qdBll = new BLL.wx_sjb_qiudui();
            if (resultType == 1)
            {
                //修改球队1的胜利次数
                qdBll.UpdateField(bisai.qd1Id.Value, " succTimes  =isnull(succTimes,0)+1");
            }
            else if (resultType == 2)
            {
                qdBll.UpdateField(bisai.qd2Id.Value, " succTimes  =isnull(succTimes,0)+1");
            }
            else if (resultType == 3)
            {

                qdBll.UpdateField(bisai.qd1Id.Value, " succTimes  =isnull(succTimes,0)+1");
                qdBll.UpdateField(bisai.qd2Id.Value, " succTimes  =isnull(succTimes,0)+1");

            }


            AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改球队设置,主键为" + bisaiid); //记录日志
            JscriptMsg("修改成功!", "bisai_list.aspx?id=" + richengid, "Success");


        }
示例#3
0
 public void qiudui2()
 {
     BLL.wx_sjb_qiudui cBll = new BLL.wx_sjb_qiudui();
     IList<Model.wx_sjb_qiudui> cateList = cBll.GetModelList(" wid=" + wid);
     qd2Id.DataValueField = "id";
     qd2Id.DataTextField = "qdName";
     qd2Id.DataSource = cateList;
     qd2Id.DataBind();
     qd2Id.Items.Insert(0, new ListItem("请选择", ""));
 }
示例#4
0
        private void RptBind(string _strWhere, string _orderby)
        {

            Model.wx_userweixin weixin = GetWeiXinCode();

            //判断是否已经设置了微留言基本信息
            BLL.wx_sjb_bisai sbll = new BLL.wx_sjb_bisai();
            BLL.wx_sjb_qiudui qdBll = new BLL.wx_sjb_qiudui();
            string qdName = "";
            _strWhere = "rcId=" + richengid + " " + _strWhere;
            this.page = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            // DataSet ds = gbll.GetList( _strWhere);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;
                DateTime begin = new DateTime();
                DateTime end = new DateTime();
                int count = ds.Tables[0].Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    dr = ds.Tables[0].Rows[i];

                    dr["qd1Name"] = qdBll.GetQuiDuiName(MyCommFun.Obj2Int(dr["qd1Id"]));
                    dr["qd2Name"] = qdBll.GetQuiDuiName(MyCommFun.Obj2Int(dr["qd2Id"]));

                    begin = MyCommFun.Obj2DateTime(dr["beginDate"]);
                    end = MyCommFun.Obj2DateTime(dr["endDate"]);
                    if (begin > DateTime.Now)
                    {
                        dr["status_s"] = "<span class=\"act_before\">未开始</span>";
                    }
                    else if (end <= DateTime.Now)
                    {
                        dr["status_s"] = "<span class=\"act_end\">已结束</span>";
                    }
                    else
                    {
                        dr["status_s"] = "<span class=\"act_in\">进行中</span>";
                    }

                }
                ds.AcceptChanges();
            }
            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("bisai_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);


        }
        public void qiudui2()
        {
            BLL.wx_sjb_qiudui           cBll     = new BLL.wx_sjb_qiudui();
            IList <Model.wx_sjb_qiudui> cateList = cBll.GetModelList(" wid=" + wid);

            qd2Id.DataValueField = "id";
            qd2Id.DataTextField  = "qdName";
            qd2Id.DataSource     = cateList;
            qd2Id.DataBind();
            qd2Id.Items.Insert(0, new ListItem("请选择", ""));
        }
示例#6
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();

            //判断是否已经设置了微留言基本信息
            BLL.wx_sjb_bisai  sbll   = new BLL.wx_sjb_bisai();
            BLL.wx_sjb_qiudui qdBll  = new BLL.wx_sjb_qiudui();
            string            qdName = "";

            _strWhere        = "rcId=" + richengid + " " + _strWhere;
            this.page        = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            // DataSet ds = gbll.GetList( _strWhere);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow  dr;
                DateTime begin = new DateTime();
                DateTime end   = new DateTime();
                int      count = ds.Tables[0].Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    dr = ds.Tables[0].Rows[i];

                    dr["qd1Name"] = qdBll.GetQuiDuiName(MyCommFun.Obj2Int(dr["qd1Id"]));
                    dr["qd2Name"] = qdBll.GetQuiDuiName(MyCommFun.Obj2Int(dr["qd2Id"]));

                    begin = MyCommFun.Obj2DateTime(dr["beginDate"]);
                    end   = MyCommFun.Obj2DateTime(dr["endDate"]);
                    if (begin > DateTime.Now)
                    {
                        dr["status_s"] = "<span class=\"act_before\">未开始</span>";
                    }
                    else if (end <= DateTime.Now)
                    {
                        dr["status_s"] = "<span class=\"act_end\">已结束</span>";
                    }
                    else
                    {
                        dr["status_s"] = "<span class=\"act_in\">进行中</span>";
                    }
                }
                ds.AcceptChanges();
            }
            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("bisai_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
示例#7
0
        protected void save_qiudui_Click(object sender, EventArgs e)
        {
            //结果
            if (this.resultType.SelectedValue == null || this.resultType.SelectedValue.Trim().Length <= 0)
            {
                JscriptMsg("必须选择一个结果!", "back", "Error");
                return;
            }
            int resultType = Convert.ToInt32(this.resultType.SelectedValue);

            bisai = bisaibll.GetModel(bisaiid);
            if (bisai.resultType != null && bisai.resultType.ToString().Length > 0)
            {
                return;
            }
            bisaibll.Updatejg(bisaiid, resultType);


            //修改wx_sjb_jcDetail
            BLL.wx_sjb_jcDetail yonghu = new BLL.wx_sjb_jcDetail();
            yonghu.UpdateDetail(richengid, bisaiid, resultType);



            //修改wx_sjb_users
            BLL.wx_sjb_users uerbll = new BLL.wx_sjb_users();
            uerbll.UpdateField(bisaiid, resultType);  //成功个数
            uerbll.UpdateField1(bisaiid, resultType); //成功个数

            //修改wx_sjb_qiudui
            bisai = bisaibll.GetModel(bisaiid);

            //修改球队的基本表
            BLL.wx_sjb_qiudui qdBll = new BLL.wx_sjb_qiudui();
            if (resultType == 1)
            {
                //修改球队1的胜利次数
                qdBll.UpdateField(bisai.qd1Id.Value, " succTimes  =isnull(succTimes,0)+1");
            }
            else if (resultType == 2)
            {
                qdBll.UpdateField(bisai.qd2Id.Value, " succTimes  =isnull(succTimes,0)+1");
            }
            else if (resultType == 3)
            {
                qdBll.UpdateField(bisai.qd1Id.Value, " succTimes  =isnull(succTimes,0)+1");
                qdBll.UpdateField(bisai.qd2Id.Value, " succTimes  =isnull(succTimes,0)+1");
            }


            AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改球队设置,主键为" + bisaiid); //记录日志
            JscriptMsg("修改成功!", "bisai_list.aspx?id=" + richengid, "Success");
        }
        private void RptBind(string _strWhere, string _orderby)
        {

            Model.wx_userweixin weixin = GetWeiXinCode();

            //判断是否已经设置了微留言基本信息
            BLL.wx_sjb_qiudui sbll = new BLL.wx_sjb_qiudui();


            _strWhere = "wid=" + weixin.id + " " + _strWhere;
            this.page = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            // DataSet ds = gbll.GetList( _strWhere);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;

                int count = ds.Tables[0].Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    dr = ds.Tables[0].Rows[i];

                }
                ds.AcceptChanges();
            }
            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("qiudui_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);


        }
示例#9
0
        public void BindData()
        {
            //用户的基本信息
            BLL.wx_sjb_users   uBll = new BLL.wx_sjb_users();
            Model.wx_sjb_users user = new Model.wx_sjb_users();
            int uid       = 0;
            int jcRetType = 0;

            if (!uBll.ExistsByOpenid(openid, wid))
            {
                //不存在
            }
            else
            {
                //存在
                user = uBll.GetModelList("openid='" + openid + "'")[0];
                uid  = user.id;
            }

            BLL.wx_sjb_jcDetail dBll = new BLL.wx_sjb_jcDetail();

            BLL.wx_sjb_bisai           bsBll  = new BLL.wx_sjb_bisai();
            DateTime                   now    = DateTime.Now;
            IList <Model.wx_sjb_bisai> bslist = bsBll.GetModelList("jcBeginDate<='" + now.ToString() + "' and jcEndDate>'" + now.ToString() + "' and rcId in (select id from wx_sjb_richeng where wid=" + wid + ")");

            if (bslist == null || bslist.Count() <= 0)
            {
                return;
            }
            BLL.wx_sjb_qiudui   qdBll   = new BLL.wx_sjb_qiudui();
            Model.wx_sjb_qiudui qiudui  = new Model.wx_sjb_qiudui();
            Model.wx_sjb_qiudui qiudui2 = new Model.wx_sjb_qiudui();
            Model.wx_sjb_bisai  bisai   = new Model.wx_sjb_bisai();
            StringBuilder       sb      = new StringBuilder();

            for (int i = 0; i < bslist.Count; i++)
            {
                bisai = bslist[i];
                if (uid > 0)
                {
                    jcRetType = dBll.GetjcRetType(bisai.id, uid);
                }


                qiudui  = qdBll.GetModel(bisai.qd1Id.Value);
                qiudui2 = qdBll.GetModel(bisai.qd2Id.Value);

                sb.Append(" <div class=\"jc_content\">");

                //展示
                sb.Append("    <div class=\"jc_main\">");
                sb.Append("      <div class=\"jc_qiudui\">");

                sb.Append("      <img  src=\"" + qiudui.qdPic + "\" />");
                sb.Append("      <div class=\"jc_wenzi\">" + qiudui.qdName + "</div>");
                sb.Append("    </div>");

                sb.Append("   <div class=\"jc_vs\"> VS </div>");
                sb.Append("   <div class=\"jc_qiudui\">");
                sb.Append("      <img   src=\"" + qiudui2.qdPic + "\" />");
                sb.Append("      <div class=\"jc_wenzi\">" + qiudui2.qdName + "</div>");
                sb.Append("   </div>");
                sb.Append("   </div>");//jc_main
                //end:展示

                sb.Append("  <div class=\"jc_clear\"></div>");

                //form
                sb.Append("<div class=\"jc_form\">");
                if (jcRetType == 1)
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_1\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"1\" checked=\"checkde\" /><label for=\"radQd_" + bisai.id + "_1\">" + qiudui.qdName + "胜</label>");
                }
                else
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_1\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"1\" /><label for=\"radQd_" + bisai.id + "_1\">" + qiudui.qdName + "胜</label>");
                }

                if (jcRetType == 3)
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_3\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"3\" checked=\"checkde\" /><label for=\"radQd_" + bisai.id + "_3\">平局</label>");
                }
                else
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_3\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"3\"   /><label for=\"radQd_" + bisai.id + "_3\">平局</label>");
                }

                if (jcRetType == 2)
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_2\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"2\"  checked=\"checkde\"  /><label for=\"radQd_" + bisai.id + "_2\">" + qiudui2.qdName + "胜</label>");
                }
                else
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_2\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"2\" /><label for=\"radQd_" + bisai.id + "_2\">" + qiudui2.qdName + "胜</label>");
                }
                if (jcRetType <= 0)
                {
                    sb.Append("    <input id=\"btnJS1\" class=\"btnJs\" type=\"button\" value=\"提交\" group=\"jingcai" + bisai.id + "\" bisaiid=\"" + bisai.id + "\" />");
                }
                sb.Append("</div>");

                //end:form

                sb.Append(" </div>");
            }//end:for


            litJcStr.Text = sb.ToString();
        }
示例#10
0
        public void BindData()
        {
            //用户的基本信息
            BLL.wx_sjb_users uBll = new BLL.wx_sjb_users();
            Model.wx_sjb_users user = new Model.wx_sjb_users();
            int uid = 0;
            int jcRetType = 0;
            if (!uBll.ExistsByOpenid(openid, wid))
            {
                //不存在
            }
            else
            {
                //存在
                user = uBll.GetModelList("openid='" + openid + "'")[0];
                uid = user.id;
            }

            BLL.wx_sjb_jcDetail dBll = new BLL.wx_sjb_jcDetail();

            BLL.wx_sjb_bisai bsBll = new BLL.wx_sjb_bisai();
            DateTime now = DateTime.Now;
            IList<Model.wx_sjb_bisai> bslist = bsBll.GetModelList("jcBeginDate<='" + now.ToString() + "' and jcEndDate>'" + now.ToString() + "' and rcId in (select id from wx_sjb_richeng where wid=" + wid + ") order by beginDate asc");

            if (bslist == null || bslist.Count() <= 0)
            {
                return;
            }
            BLL.wx_sjb_qiudui qdBll = new BLL.wx_sjb_qiudui();
            Model.wx_sjb_qiudui qiudui = new Model.wx_sjb_qiudui();
               Model.wx_sjb_qiudui qiudui2 = new Model.wx_sjb_qiudui();
            Model.wx_sjb_bisai bisai = new Model.wx_sjb_bisai();
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < bslist.Count; i++)
            {
                bisai = bslist[i];
                if (uid > 0)
                {
                    jcRetType = dBll.GetjcRetType(bisai.id, uid);
                }

                qiudui = qdBll.GetModel(bisai.qd1Id.Value);
                qiudui2 = qdBll.GetModel(bisai.qd2Id.Value);

                sb.Append(" <div class=\"jc_content\">");

                //展示
                sb.Append("    <div class=\"jc_main\">");
               ;
                sb.Append("      <div class=\"jc_qiudui\">");

                sb.Append("      <img  src=\"" + qiudui.qdPic+ "\" />");
                sb.Append("      <div class=\"jc_wenzi\">" + qiudui.qdName+ "</div>");
                sb.Append("    </div>");

                sb.Append("   <div class=\"jc_vs\"> VS </div>");
                sb.Append("   <div class=\"jc_qiudui\">");
                sb.Append("      <img   src=\""+qiudui2.qdPic+"\" />");
                sb.Append("      <div class=\"jc_wenzi\">"+qiudui2.qdName+"</div>");
                sb.Append("   </div>");
                sb.Append("   </div>");//jc_main
                //end:展示

                sb.Append("  <div class=\"jc_clear\"></div>");

                //form
                sb.Append("<div class=\"jc_form\">");
                sb.Append("<div>");
                if (jcRetType == 1)
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_1\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"1\" checked=\"checkde\" /><label for=\"radQd_" + bisai.id + "_1\">" + qiudui.qdName + "胜</label>");

                }
                else
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_1\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"1\" /><label for=\"radQd_" + bisai.id + "_1\">" + qiudui.qdName + "胜</label>");

                }
                sb.Append("</div>");

                sb.Append("<div>");
                if (jcRetType == 3)
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_3\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"3\" checked=\"checkde\" /><label for=\"radQd_" + bisai.id + "_3\">平局</label>");

                }
                else
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_3\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"3\"   /><label for=\"radQd_" + bisai.id + "_3\">平局</label>");
                }
                sb.Append("</div>");

                sb.Append("<div>");
                if (jcRetType == 2)
                {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_2\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"2\"  checked=\"checkde\"  /><label for=\"radQd_" + bisai.id + "_2\">" + qiudui2.qdName + "胜</label>");
                }
                else {
                    sb.Append("   <input id=\"radQd_" + bisai.id + "_2\" type=\"radio\" name=\"jingcai" + bisai.id + "\" value=\"2\" /><label for=\"radQd_" + bisai.id + "_2\">" + qiudui2.qdName + "胜</label>");

                }
                sb.Append("</div>");

                sb.Append("<div class='divbtn'>");
                if (jcRetType <= 0)
                {
                    sb.Append("    <input id=\"btnJS1\" class=\"btnJs\" type=\"button\" value=\"提交\" group=\"jingcai" + bisai.id + "\" bisaiid=\"" + bisai.id + "\" />");
                }
                sb.Append("</div>");
                    sb.Append("</div>");

                //end:form

                sb.Append(" </div>");

            }//end:for

            litJcStr.Text = sb.ToString();
        }