コード例 #1
0
        /// <summary>
        /// 平安时用的
        /// </summary>
        /// <param name="catalogId"></param>
        /// <param name="userId"></param>
        /// <param name="deptID"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        public static DataSet SearchByDept(Guid catalogId, Guid userId, Guid deptID, int pageSize, int pageIndex)
        {
            /** 使用索引搜索开始 *****************************/
            if (ResourceIndex.IsUsingIndex)
            {
                string Catalogid    = catalogId.ToString();
                string groupid      = deptID.ToString();
                string keyword      = string.Empty;
                string beginDate    = string.Empty;
                string endDate      = string.Empty;
                string Userid       = userId.ToString();
                int    PageSize     = pageSize;
                int    PageNum      = pageIndex;
                string resourceType = "video,image,document,other";
                int    pageCount    = 0;

                if (Catalogid.Equals(new Guid().ToString()))
                {
                    Catalogid = "";
                }
                else
                {
                    Catalogid = " " + Catalogid;
                }

                if (!string.IsNullOrEmpty(groupid.Trim()))
                {
                    groupid = " " + groupid;
                }
                else
                {
                    groupid = "";
                }

                PageNum++;

                DataSet ds    = ResourceIndex.Search(keyword + Catalogid + groupid, beginDate, endDate, Userid, PageSize, PageNum, ref pageCount, resourceType);
                DataSet newDS = new DataSet();
                newDS.Tables.Add(ds.Tables[1].DefaultView.ToTable());
                newDS.Tables.Add(ds.Tables[0].DefaultView.ToTable());

                return(newDS);
            }
            /** 使用索引搜索结束 *******************************/


            QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService();
            return(ss.SearchByDept(catalogId, userId, deptID, pageSize, pageIndex));
        }
コード例 #2
0
ファイル: ImageStorage.cs プロジェクト: rongcheng/benz
 public static DataSet SearchByDept(Guid catalogId, Guid userId, Guid deptID, int pageSize, int pageIndex)
 {
     QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService();
     return(ss.SearchByDept(catalogId, userId, deptID, pageSize, pageIndex));
 }
コード例 #3
0
ファイル: Resource.cs プロジェクト: rongcheng/benz
        /// <summary>
        /// 平安时用的
        /// </summary>
        /// <param name="catalogId"></param>
        /// <param name="userId"></param>
        /// <param name="deptID"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        public static DataSet SearchByDept(Guid catalogId, Guid userId, Guid deptID, int pageSize, int pageIndex)
        {

            /** 使用索引搜索开始 *****************************/
            if (ResourceIndex.IsUsingIndex)
            {
                string Catalogid = catalogId.ToString();
                string groupid = deptID.ToString();
                string keyword = string.Empty;
                string beginDate=string.Empty;
                string endDate=string.Empty;
                string Userid = userId.ToString();
                int PageSize = pageSize;
                int PageNum = pageIndex;
                string resourceType = "video,image,document,other";
                int pageCount=0;

                if (Catalogid.Equals(new Guid().ToString()))
                {
                    Catalogid = "";
                }
                else
                {
                    Catalogid = " " + Catalogid;
                }

                if (!string.IsNullOrEmpty(groupid.Trim()))
                {
                    groupid = " " + groupid;
                }
                else
                {
                    groupid = "";
                }

                PageNum++;

                DataSet ds= ResourceIndex.Search(keyword+Catalogid+groupid, beginDate, endDate,  Userid, PageSize, PageNum, ref pageCount, resourceType);
                DataSet newDS=new DataSet();
                newDS.Tables.Add(ds.Tables[1].DefaultView.ToTable());
                newDS.Tables.Add(ds.Tables[0].DefaultView.ToTable());

                return newDS;

            }
            /** 使用索引搜索结束 *******************************/


            QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService();
            return ss.SearchByDept(catalogId, userId, deptID, pageSize, pageIndex);
        }
コード例 #4
0
ファイル: ImageStorage.cs プロジェクト: rongcheng/benz
 public static DataSet SearchByDept(Guid catalogId, Guid userId, Guid deptID, int pageSize, int pageIndex)
 {
     QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService();
     return ss.SearchByDept(catalogId, userId, deptID, pageSize, pageIndex);
 }