Ejemplo n.º 1
0
        private DataTable BindData()
        {
            Entities.QueryAgentStateDetail query = new Entities.QueryAgentStateDetail()
            {
                LoginID = BLL.Util.GetLoginUserID().ToString()
            };
            if (!string.IsNullOrEmpty(AgentID))
            {
                query.AgentID = AgentID.Trim();
            }
            if (!string.IsNullOrEmpty(AgentNum))
            {
                query.AgentNum = AgentNum.Trim();
            }

            if (!string.IsNullOrEmpty(StartTime))
            {
                query.StartTime = StartTime;
            }
            if (!string.IsNullOrEmpty(State))
            {
                query.State = State;
            }
            if (!string.IsNullOrEmpty(AgentAuxState))
            {
                query.AgentAuxState = AgentAuxState;
            }

            int count;

            return(BitAuto.ISDC.CC2012.BLL.AgentStateDetail.Instance.GetStateDetail(query, 1, -1, BLL.Util.GetLoginUserID(), out count));
        }
        private void BindData()
        {
            if (!int.TryParse(RequestPageSize, out PageSize))
            {
                PageSize = 20;
            }

            Entities.QueryAgentStateDetail query = new Entities.QueryAgentStateDetail()
            {
                LoginID = BLL.Util.GetLoginUserID().ToString()
            };



            if (!string.IsNullOrEmpty(AgentID))
            {
                query.AgentID = AgentID.Trim();
            }
            if (!string.IsNullOrEmpty(AgentNum))
            {
                query.AgentNum = AgentNum.Trim();
            }

            if (!string.IsNullOrEmpty(StartTime))
            {
                query.StartTime = StartTime;
            }
            if (!string.IsNullOrEmpty(State))
            {
                query.State = State;
            }
            if (!string.IsNullOrEmpty(AgentAuxState))
            {
                query.AgentAuxState = AgentAuxState;
            }

            int       count;
            DataTable dt = BitAuto.ISDC.CC2012.BLL.AgentStateDetail.Instance.GetStateDetail(query, PageCommon.Instance.PageIndex, PageSize, BLL.Util.GetLoginUserID(), out count);

            RecordCount             = count;
            repeaterList.DataSource = dt;
            repeaterList.DataBind();
            litPagerDown.Text = PageCommon.Instance.LinkStringByPost(BLL.Util.GetUrl(), GroupLength, count, PageSize,
                                                                     PageCommon.Instance.PageIndex, 1);
        }