示例#1
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.manager model = GetAdminInfo(); //取得当前管理员信息
            _strWhere        = "isDelete=0 " + _strWhere;
            this.page        = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;

            this.rptList.DataSource = bll.GetUserWeiXinList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

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

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
示例#2
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.manager model = GetAdminInfo(); //取得当前管理员信息
            _strWhere        = "isDelete=0 " + _strWhere;
            this.page        = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;

            Model.manager adminEntity = GetAdminInfo(); //取得当前管理员信息
            _strWhere += " and (agentId=" + adminEntity.id + " or uId=" + adminEntity.id + " )";

            DataSet ds = bll.GetUserWeiXinList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr;
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    dr = ds.Tables[0].Rows[i];
                    DateTime endDate = MyCommFun.Obj2DateTime(dr["endDate"]);
                    if (endDate < DateTime.Now)
                    {
                        dr["daoqistr"] = "<span class='guoqi'>" + endDate.ToString("yyyy-MM-dd") + "[已过期]</span>";
                    }
                    else if (endDate < DateTime.Now.AddDays(20))
                    {
                        dr["daoqistr"] = "<span class='kuaidaoqi'>" + endDate.ToString("yyyy-MM-dd") + "[需尽快充值]</span>";
                    }
                    else
                    {
                        dr["daoqistr"] = "<span class='weiguoqi'>" + endDate.ToString("yyyy-MM-dd") + "</span>";
                    }
                }
            }

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

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

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }