private void BindData() { YanFa.Crm2009.Entities.QueryWorkReport query = new YanFa.Crm2009.Entities.QueryWorkReport(); query.CreateUser = BLL.Util.GetLoginUserID(); if (!string.IsNullOrEmpty(SearchType)) { query.Types = SearchType; } int totalCount = 0; //查询数据 IList <YanFa.Crm2009.Entities.WorkReport> list = YanFa.Crm2009.BLL.WorkReport.Instance.GetList(query, "wr.[Status] desc,(case when wr.[Status]=1 then wr.[CreateTime] when wr.[Status]=0 then wr.[PostTime] else null end) desc", BLL.PageCommon.Instance.PageIndex, PageSize, out totalCount); repeaterTableList.DataSource = list; repeaterTableList.DataBind(); litPagerDown.Text = BLL.PageCommon.Instance.LinkStringByPost(BLL.Util.GetUrl(), GroupLength, totalCount, PageSize, BLL.PageCommon.Instance.PageIndex, 1); }
private void BindData() { YanFa.Crm2009.Entities.QueryWorkReport query = new YanFa.Crm2009.Entities.QueryWorkReport(); if (!string.IsNullOrEmpty(txtName)) { query.CreateUserName = txtName; } if (!string.IsNullOrEmpty(SearchType)) { query.Types = SearchType; } if (HasReply == "1") { query.HasReply = true; } else if (HasReply == "0") { query.HasReply = false; } if (HasRead == "1") { query.HasRead = true; } else if (HasRead == "0") { query.HasRead = false; } query.RecipientUserID = BLL.Util.GetLoginUserID(); int totalCount = 0; IList <YanFa.Crm2009.Entities.WorkReport> list = YanFa.Crm2009.BLL.WorkReport.Instance.GetList(query, "(CASE WHEN wrr.VisitTime IS NULL THEN 0 ELSE 1 END), wr.PostTime DESC", BLL.PageCommon.Instance.PageIndex, PageSize, out totalCount); repeaterTableList.DataSource = list; repeaterTableList.DataBind(); litPagerDown.Text = BLL.PageCommon.Instance.LinkStringByPost(BLL.Util.GetUrl(), GroupLength, totalCount, PageSize, BLL.PageCommon.Instance.PageIndex, 1); }