Пример #1
0
        /// <summary>
        /// 分页获取数据列表(用户信息表)
        /// </summary>
        public PeterPages GetSearch(LogList LogList, int PageIndex, int PageSize)
        {
            PeterPages fy       = null;
            string     sqlwhere = " 1=1 ";

            if (!string.IsNullOrEmpty(LogList.username))
            {
                sqlwhere = sqlwhere + " and username like '%" + LogList.username + "%' ";
            }
            //获取开始日期和结束日期
            string startTime = LogList.tmp_Data.Split('|')[0];
            string endTime   = LogList.tmp_Data.Split('|')[1];

            if (startTime != "" && endTime != "")
            {
                sqlwhere = sqlwhere + @" and  ( convert(varchar,LogTime, 120 )   between '" + startTime
                           + "' and  convert(char(10),dateadd(dd,1,'" + endTime + "'),120)) ";
            }
            PageInfoNew entity = new PageInfoNew();

            entity.Sqlwhere   = sqlwhere.Trim();
            entity.Tablename  = "[LogList]";     //用户表,注意如果是多表可以写成视图进行查询,这里就为视图名称
            entity.PageSize   = PageSize;
            entity.Fieldkey   = "id";            //主键
            entity.Orderfield = " LogTime desc"; //排序字段
            entity.PageIndex  = PageIndex;
            entity.Fields     = "*";

            fy = SqlPageList.GetPageLists(entity);
            return(fy);
        }
Пример #2
0
        /// <summary>
        /// 分页获取数据列表(案卷借阅表)
        /// </summary>
        public PeterPages GetSearch(FileDestroy FileDestroy, int PageIndex, int PageSize, string strCountyId)
        {
            PeterPages fy       = null;
            string     sqlwhere = " 1=1 ";

            if (FileDestroy.FileClassID > 0)
            {
                sqlwhere = sqlwhere + " and FileClassID like '%" + FileDestroy.FileClassID + "%' ";
            }
            if (!string.IsNullOrEmpty(FileDestroy.FileEnterName))
            {
                sqlwhere = sqlwhere + " and FileEnterName like '%" + FileDestroy.FileEnterName + "%' ";
            }
            if (strCountyId != "")
            {
                sqlwhere = sqlwhere + " and SZQXDM ='" + strCountyId + "' ";
            }

            PageInfoNew entity = new PageInfoNew();

            entity.Sqlwhere   = sqlwhere.Trim();
            entity.Tablename  = "[FileDestroy]";     //用户表,注意如果是多表可以写成视图进行查询,这里就为视图名称
            entity.PageSize   = PageSize;
            entity.Fieldkey   = "id";                //主键
            entity.Orderfield = " DestroyDate desc"; //排序字段
            entity.PageIndex  = PageIndex;
            entity.Fields     = "*";

            fy = SqlPageList.GetPageLists(entity);
            return(fy);
        }
Пример #3
0
        /// <summary>
        /// 分页获取数据列表(用户信息表)
        /// </summary>
        public PeterPages GetSearch(UserList UserList, int PageIndex, int PageSize)
        {
            PeterPages fy       = null;
            string     sqlwhere = " 1=1 ";

            if (!string.IsNullOrEmpty(UserList.userName))
            {
                sqlwhere = sqlwhere + " and userName like '%" + UserList.userName + "%' ";
            }
            if (UserList.userState != -1)
            {
                sqlwhere = sqlwhere + " and userState=" + UserList.userState + " ";
            }
            PageInfoNew entity = new PageInfoNew();

            entity.Sqlwhere   = sqlwhere.Trim();
            entity.Tablename  = "[UserList]";    //用户表,注意如果是多表可以写成视图进行查询,这里就为视图名称
            entity.PageSize   = PageSize;
            entity.Fieldkey   = "id";            //主键
            entity.Orderfield = " AddTime desc"; //排序字段
            entity.PageIndex  = PageIndex;
            entity.Fields     = "*";

            fy = SqlPageList.GetPageLists(entity);
            return(fy);
        }
Пример #4
0
        /// <summary>
        /// 分页获取数据列表(案卷类别表)
        /// </summary>
        public PeterPages GetSearch(FileClass FileClass, int PageIndex, int PageSize)
        {
            PeterPages fy       = null;
            string     sqlwhere = " 1=1 ";

            if (!string.IsNullOrEmpty(FileClass.FileCode))
            {
                sqlwhere = sqlwhere + " and FileCode like '%" + FileClass.FileCode + "%' ";
            }
            if (!string.IsNullOrEmpty(FileClass.FileName))
            {
                sqlwhere = sqlwhere + " and FileName like '%" + FileClass.FileName + "%' ";
            }

            PageInfoNew entity = new PageInfoNew();

            entity.Sqlwhere   = sqlwhere.Trim();
            entity.Tablename  = "[FileClass]"; //用户表,注意如果是多表可以写成视图进行查询,这里就为视图名称
            entity.PageSize   = PageSize;
            entity.Fieldkey   = "id";          //主键
            entity.Orderfield = " id asc";     //排序字段
            entity.PageIndex  = PageIndex;
            entity.Fields     = "*";

            fy = SqlPageList.GetPageLists(entity);
            return(fy);
        }
Пример #5
0
        /// <summary>
        /// 分页获取数据列表(承办单位表)
        /// </summary>
        public PeterPages GetSearch(FileLibrary FileLibrary, int PageIndex, int PageSize)
        {
            PeterPages fy       = null;
            string     sqlwhere = " 1=1 ";

            if (!string.IsNullOrEmpty(LoginUser.CountyId))
            {
                sqlwhere = "QXDM='" + LoginUser.CountyId + "'";
            }
            if (!string.IsNullOrEmpty(FileLibrary.FileLibraryName))
            {
                sqlwhere = sqlwhere + " and FileLibraryName like '%" + FileLibrary.FileLibraryName + "%' ";
            }
            PageInfoNew entity = new PageInfoNew();

            entity.Sqlwhere   = sqlwhere.Trim();
            entity.Tablename  = "[FileLibrary]"; //用户表,注意如果是多表可以写成视图进行查询,这里就为视图名称
            entity.PageSize   = PageSize;
            entity.Fieldkey   = "ID";            //主键
            entity.Orderfield = " ID desc";      //排序字段
            entity.PageIndex  = PageIndex;
            entity.Fields     = "*";

            fy = SqlPageList.GetPageLists(entity);
            return(fy);
        }
Пример #6
0
        /// <summary>
        /// 分页获取数据列表(案卷类别表)
        /// </summary>
        public PeterPages GetSearch(FileBorrow FileBorrow, int PageIndex, int PageSize, string strCountyId)
        {
            PeterPages fy       = null;
            string     sqlwhere = " 1=1 ";

            if (FileBorrow.FileClassID > 0)
            {
                sqlwhere = sqlwhere + " and FileClassID like '%" + FileBorrow.FileClassID + "%' ";
            }
            if (!string.IsNullOrEmpty(FileBorrow.FileEnterName))
            {
                sqlwhere = sqlwhere + " and FileEnterName like '%" + FileBorrow.FileEnterName + "%' ";
            }
            if (strCountyId != "")
            {
                sqlwhere = sqlwhere + " and SZQXDM ='" + strCountyId + "' ";
            }
            //数据类型 0默认全部[1未归还, 2已归还]
            if (FileBorrow.SJLX == 1)
            {
                sqlwhere = sqlwhere + " and ReturnDate ='' ";
            }
            else if (FileBorrow.SJLX == 2)
            {
                sqlwhere = sqlwhere + " and ReturnDate <>'' ";
            }

            PageInfoNew entity = new PageInfoNew();

            entity.Sqlwhere   = sqlwhere.Trim();
            entity.Tablename  = "[FileBorrow]";                    //用户表,注意如果是多表可以写成视图进行查询,这里就为视图名称
            entity.PageSize   = PageSize;
            entity.Fieldkey   = "id";                              //主键
            entity.Orderfield = " BorrowDate desc,ReturnDate asc"; //排序字段
            entity.PageIndex  = PageIndex;
            entity.Fields     = "*";

            fy = SqlPageList.GetPageLists(entity);
            return(fy);
        }
Пример #7
0
        /// <summary>
        /// 分页获取数据列表(保管期限表)
        /// </summary>
        public PeterPages GetSearch(SaveDeadline SaveDeadline, int PageIndex, int PageSize)
        {
            PeterPages fy       = null;
            string     sqlwhere = " 1=1 ";

            if (!string.IsNullOrEmpty(SaveDeadline.YearName))
            {
                sqlwhere = sqlwhere + " and YearName like '%" + SaveDeadline.YearName + "%' ";
            }
            PageInfoNew entity = new PageInfoNew();

            entity.Sqlwhere   = sqlwhere.Trim();
            entity.Tablename  = "[SaveDeadline]"; //用户表,注意如果是多表可以写成视图进行查询,这里就为视图名称
            entity.PageSize   = PageSize;
            entity.Fieldkey   = "id";             //主键
            entity.Orderfield = " id desc";       //排序字段
            entity.PageIndex  = PageIndex;
            entity.Fields     = "*";

            fy = SqlPageList.GetPageLists(entity);
            return(fy);
        }
Пример #8
0
        /// <summary>
        /// 分页获取数据列表(档案移交支队)
        /// </summary>
        public PeterPages GetSearch(FileTransfer FileTransfer, int PageIndex, int PageSize, string strCountyId, string strwhere)
        {
            PeterPages fy       = null;
            string     sqlwhere = " 1=1 ";

            //if (FileTransfer.FileClassID > 0)
            //{
            //    sqlwhere = sqlwhere + " and FileClassID like '%" + FileTransfer.FileClassID + "%' ";
            //}
            if (!string.IsNullOrEmpty(FileTransfer.FileEnterName))
            {
                sqlwhere = sqlwhere + " and FileEnterName like '%" + FileTransfer.FileEnterName + "%' ";
            }
            //获取开始日期和结束日期
            string startTime = FileTransfer.TransferDate.Split('|')[0];
            string endTime   = FileTransfer.TransferDate.Split('|')[1];

            if (startTime != "" && endTime != "" && FileTransfer.Lssjlx == 0)  //移交时间
            {
                sqlwhere = sqlwhere + @" and  ( convert(varchar,TransferDate, 120 )   between '" + startTime
                           + "' and  convert(char(10),dateadd(dd,1,'" + endTime + "'),120)) ";
            }
            if (startTime != "" && endTime != "" && FileTransfer.Lssjlx == 1)  //接收时间
            {
                sqlwhere = sqlwhere + @" and  ( convert(varchar,Jssj, 120 )   between '" + startTime
                           + "' and  convert(char(10),dateadd(dd,1,'" + endTime + "'),120)) ";
            }
            if (startTime != "" && endTime != "" && FileTransfer.Lssjlx == 2)  //归档时间
            {
                sqlwhere = sqlwhere + @" and  ( convert(varchar,Gdsj, 120 )   between '" + startTime
                           + "' and  convert(char(10),dateadd(dd,1,'" + endTime + "'),120)) ";
            }
            if (strCountyId != "420100")
            {
                sqlwhere = sqlwhere + " and SZQXDM ='" + strCountyId + "' ";
            }
            //数据状态 0 未接收  1拒收 2已接受 3已归档
            if (FileTransfer.SJZT == 3)
            {
                sqlwhere = sqlwhere + " and sjzt  in (2,3) ";
            }
            else if (FileTransfer.SJZT == 0)
            {
            }
            else
            {
                sqlwhere = sqlwhere + " and sjzt =" + (FileTransfer.SJZT - 1) + " ";
            }
            sqlwhere = sqlwhere + strwhere;
            PageInfoNew entity = new PageInfoNew();

            entity.Sqlwhere   = sqlwhere.Trim();
            entity.Tablename  = "[FileTransfer]";              //用户表,注意如果是多表可以写成视图进行查询,这里就为视图名称
            entity.PageSize   = PageSize;
            entity.Fieldkey   = "id";                          //主键
            entity.Orderfield = " sjzt asc,TransferDate desc"; //排序字段
            entity.PageIndex  = PageIndex;
            entity.Fields     = "*";

            fy = SqlPageList.GetPageLists(entity);
            return(fy);
        }