Пример #1
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.manager model = GetAdminInfo(); //取得当前管理员信息
            _strWhere = "uId=" + model.id + " and isDelete=0 " + _strWhere + " order by " + _orderby;

            txtKeywords.Text = this.keywords;
            IList <Model.wx_userweixin> wxList = bll.GetModelList(_strWhere);

            if (wxList != null)
            {
                lblHasNum.Text = wxList.Count.ToString();
            }
            lblTotNum.Text = model.wxNum.ToString();

            this.rptList.DataSource = wxList;
            this.rptList.DataBind();
        }
Пример #2
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.manager model = GetAdminInfo(); //取得当前管理员信息
            _strWhere = "uId=" + model.id + " and isDelete=0 " + _strWhere + " order by " + _orderby;

            txtKeywords.Text = this.keywords;
            IList <Model.wx_userweixin> wxList = bll.GetModelList(_strWhere);

            if (wxList != null)
            {
                lblHasNum.Text = wxList.Count.ToString();
                if (wxList.Count > 0)
                {
                    for (int i = 0; i < wxList.Count; i++)
                    {
                        wxList[i].extStr = "<span class=\"span_zhengchang\">正常</span>";
                        if (wxList[i].wStatus != null && wxList[i].wStatus == 0)
                        {
                            wxList[i].extStr = "<span class=\"span_jinyong\">禁用</span>";
                        }

                        if (wxList[i].endDate != null)
                        {
                            if (wxList[i].endDate < DateTime.Now)
                            {
                                wxList[i].extStr = "<span class=\"span_guoqi\">过期</span>";
                            }
                            else if (wxList[i].endDate < DateTime.Now.AddDays(15))
                            {
                                wxList[i].extStr = "<span class=\"span_kguoqi\">快到期</span>";
                            }
                        }
                    }
                }
            }

            lblTotNum.Text = model.wxNum.ToString();

            this.rptList.DataSource = wxList;
            this.rptList.DataBind();
        }