public ActionResult Index(int id = 1)
        {
            //1.如果是点击查询控件的查询按钮,那么将查询条件作为QueryString附加在地址后面(为了在客户端保存查询条件的状体),重新发起一次请求。
            if (this.Request.HttpMethod.ToLower().Contains("post"))
            {
                string targetUrlWithoutParam = Url.Action("Index", new { id = 1 });
                string targetUrl             = QueryControlHelper.GetNewQueryUrl("QueryControl", targetUrlWithoutParam);
                return(Redirect(targetUrl));
            }

            //2.通常情形下走get查询
            int    pageIndex   = id;
            int    pageSize    = SystemConst.CountPerPage;
            int    startIndex  = (pageIndex - 1) * pageSize + 1;
            string whereClause = " 1=1 ";

            ////--数据权限----------------------------------------------------------------------
            //whereClause += " AND ( ";
            //whereClause += string.Format(" {0} ", PermissionDataHelper.GetFilterCondition("FinanceUserGuid"));
            //whereClause += string.Format(" OR {0} ", PermissionDataHelper.GetFilterCondition("ProviderUserGuid"));
            //whereClause += string.Format(" OR {0} ", PermissionDataHelper.GetFilterCondition("RecommendUserGuid"));
            //whereClause += string.Format(" OR {0} ", PermissionDataHelper.GetFilterCondition("ServiceUserGuid"));
            //whereClause += " ) ";
            ////--end--------------------------------------------------------------------------

            string orderClause = "InformationBrokerID DESC";

            whereClause += " AND " + QueryControlHelper.GetQueryCondition("QueryControl");

            PagedEntityCollection <InformationBrokerEntity> entityList  = InformationBrokerBLL.Instance.GetPagedCollection(startIndex, pageSize, whereClause, orderClause);
            PagedList <InformationBrokerEntity>             pagedExList = new PagedList <InformationBrokerEntity>(entityList.Records, entityList.PageIndex, entityList.PageSize, entityList.TotalCount);

            return(View(pagedExList));
        }
Пример #2
0
        /// <summary>
        /// 内部员工列表
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(int id = 1)
        {
            //1.如果是点击查询控件的查询按钮,那么将查询条件作为QueryString附加在地址后面(为了在客户端保存查询条件的状体),重新发起一次请求。
            if (this.Request.HttpMethod.ToLower().Contains("post"))
            {
                string targetUrlWithoutParam = Url.Action("Index", new { id = 1 });
                string targetUrl             = QueryControlHelper.GetNewQueryUrl("QueryControl", targetUrlWithoutParam);
                return(Redirect(targetUrl));
            }

            //2.通常情形下走get查询
            int    pageIndex   = id;
            int    pageSize    = SystemConst.CountPerPage;
            int    startIndex  = (pageIndex - 1) * pageSize + 1;
            string whereClause = " 1=1 ";
            string orderClause = "EmployeeID DESC";

            whereClause += " AND " + QueryControlHelper.GetQueryCondition("QueryControl");

            //如果未设置人员的状态,那么仅仅显示当前有效的用户
            if (whereClause.ToLower().Contains("userstatus") == false)
            {
                whereClause += string.Format(" AND UserStatus={0} ", (int)UserStatuses.Normal);
            }

            PagedEntityCollection <EmployeeEntity> entityList  = EmployeeBLL.Instance.GetPagedCollection(startIndex, pageSize, whereClause, orderClause);
            PagedList <EmployeeEntity>             pagedExList = new PagedList <EmployeeEntity>(entityList.Records, entityList.PageIndex, entityList.PageSize, entityList.TotalCount);

            return(View(pagedExList));
        }
Пример #3
0
        public ActionResult Index(int id = 1)
        {
            //1.如果是点击查询控件的查询按钮,那么将查询条件作为QueryString附加在地址后面(为了在客户端保存查询条件的状体),重新发起一次请求。
            if (this.Request.HttpMethod.ToLower().Contains("post"))
            {
                string targetUrlWithoutParam = Url.Action("Index", new { id = 1 });
                string targetUrl             = QueryControlHelper.GetNewQueryUrl("QueryControl", targetUrlWithoutParam);
                return(Redirect(targetUrl));
            }

            //2.通常情形下走get查询
            int    pageIndex   = id;
            int    pageSize    = SystemConst.CountPerPage;
            int    startIndex  = (pageIndex - 1) * pageSize + 1;
            string whereClause = string.Format(" 1=1  AND ReceiverKey='{0}' ", BusinessUserBLL.CurrentUser.UserGuid); //string.Format(" LoanType= {0} AND LoanStatus!={1}  ",                (int)loanType, (int)LoanStatuses.UserUnCompleted);
            string orderClause = "RemindID DESC";

            whereClause += " AND " + QueryControlHelper.GetQueryCondition("QueryControl");

            PagedEntityCollection <RemindEntity> entityList  = RemindBLL.Instance.GetPagedCollection(startIndex, pageSize, whereClause, orderClause);
            PagedList <RemindEntity>             pagedExList = new PagedList <RemindEntity>(entityList.Records, entityList.PageIndex, entityList.PageSize, entityList.TotalCount);

            return(View(pagedExList));
        }
Пример #4
0
        public ActionResult OperateLogList(int id = 1)
        {
            //1.如果是点击查询控件的查询按钮,那么将查询条件作为QueryString附加在地址后面(为了在客户端保存查询条件的状体),重新发起一次请求。
            if (this.Request.HttpMethod.ToLower().Contains("post"))
            {
                string targetUrlWithoutParam = Url.Action("OperateLogList", new { id = 1 });
                string targetUrl             = QueryControlHelper.GetNewQueryUrl("QueryControl", targetUrlWithoutParam);
                return(Redirect(targetUrl));
            }

            //2.通常情形下走get查询
            int    pageIndex   = id;
            int    pageSize    = SystemConst.CountPerPage;
            int    startIndex  = (pageIndex - 1) * pageSize + 1;
            string whereClause = " 1=1 ";
            string orderClause = "LogID DESC";

            whereClause += " AND " + QueryControlHelper.GetQueryCondition("QueryControl");

            PagedEntityCollection <OperateLogEntity> entityList  = OperateLogBLL.Instance.GetPagedCollection(startIndex, pageSize, whereClause, orderClause);
            PagedList <OperateLogEntity>             pagedExList = new PagedList <OperateLogEntity>(entityList.Records, entityList.PageIndex, entityList.PageSize, entityList.TotalCount);

            return(View(pagedExList));
        }