public static DataSet SearchImage(int pageSize, int pageIndex, out int pageCount, string keyword, DateTime beg, DateTime end, Guid catalogId, Guid userId) { pageCount = 0; string sqlWhere = string.Empty; if (!string.IsNullOrEmpty(keyword)) { sqlWhere += " And (Keyword like '%" + keyword + "%' or Caption like '%" + keyword + "%' or ItemSerialNum like '%" + keyword + "%')"; } if (catalogId != Guid.Empty) { sqlWhere += " And ic.catalogId='" + catalogId.ToString() + "'"; } if (beg != DateTime.MaxValue && end != DateTime.MaxValue) { sqlWhere += " And datediff(d,'" + beg.ToShortDateString() + "',i.uploadDate)>=0 And datediff(d,'" + end.ToShortDateString() + "',i.uploadDate)<=0"; } QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService(); return(ss.Search(sqlWhere, userId, pageIndex, pageSize)); }
/// <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)); }
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)); }
/// <summary> /// 删除图片信息 /// </summary> /// <param></param> /// <returns></returns> //public void Delete() //{ // string sql = "DELETE FROM ImageStorage WHERE ItemId ='" + this.ItemId + "'"; // SqlHelper.ExecuteNonQuery(SqlHelper.SqlCon_QJVRMS, CommandType.Text, sql); //} /// <summary> /// 修改图片信息 /// </summary> /// <param></param> /// <returns></returns> //public void Store() //{ // string sql = "UPDATE ImageStorage "; // sql = sql + " SET FileName='" + this.FileName + "'"; // sql = sql + " ,shotDate='" + this.shotDate + "'"; // sql = sql + " ,Keyword='" + this.Keyword + "'"; // sql = sql + " ,Description='" + this.Description + "'"; // sql = sql + " WHERE ItemId ='" + this.ItemId + "'"; // SqlHelper.ExecuteNonQuery(SqlHelper.SqlCon_QJVRMS, CommandType.Text, sql); // ImageStorageClass oImageStorageClass = new ImageStorageClass(); // oImageStorageClass.DeleteRelationshipImageAndCatalog(this.ItemId); //} /// <summary> /// 根据关键字搜索图片 add by dtf 5-30 /// 获取 ItemSerialNum,Hvsp 属性值 /// </summary> /// <returns></returns> //public static DataTable SearchImageByKeyword(string keyword, int PageSize, int PageNum, ref int rowCount) //{ // //return QJVRMS.DataAccess.ImageStorage.SearchImageByKeyword(keyword, PageSize, PageNum, ref rowCount); // QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService(); // return ss.SearchImageByKeyword(keyword, PageSize, PageNum, ref rowCount); //} /// <summary> ///按关键字或图片编号,上传时间,分类搜索图片 /// dailing /// </summary> /// <returns></returns> public static DataTable SearchImage(string keyword, string beginDate, string endDate, string Catalogid, string Userid, int PageSize, int PageNum, ref int rowCount) { //return QJVRMS.DataAccess.ImageStorage.SearchImage(keyword, uploadDate, shotDate, Catalogid,Userid, PageSize, PageNum, ref rowCount); QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService(); return(ss.SearchImage(keyword, beginDate, endDate, Catalogid, Userid, PageSize, PageNum, ref rowCount)); }
/// <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); }
public static DataSet Search(int pageSize, int pageIndex, out int pageCount, string keyword, DateTime beg, DateTime end, Guid catalogId, Guid userId) { /** 使用索引搜索开始 *****************************/ if (ResourceIndex.IsUsingIndex) { return ResourceIndex.Search(pageSize,pageIndex, out pageCount,keyword+" "+catalogId, beg, end); } /** 使用索引搜索结束 *******************************/ pageCount = 0; string sqlWhere = string.Empty; if (!string.IsNullOrEmpty(keyword)) { sqlWhere += " And (Keyword like '%" + keyword + "%' or Caption like '%" + keyword + "%' or ItemSerialNumber like '%" + keyword + "%')"; } if (catalogId != Guid.Empty) { sqlWhere += " And ic.catalogId='" + catalogId.ToString() + "'"; } if (beg != DateTime.MaxValue && end != DateTime.MaxValue) { sqlWhere += " And datediff(d,'" + beg.ToShortDateString() + "',i.uploadDate)>=0 And datediff(d,'" + end.ToShortDateString() + "',i.uploadDate)<=0"; } QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService(); return ss.Search(sqlWhere, userId, pageIndex, pageSize); }
/// <summary> ///按关键字或视频编号,上传时间,分类搜索视频 /// </summary> /// <returns></returns> public static DataTable SearchVideo(string keyword, string beginDate, string endDate, string Catalogid, string Userid, int PageSize, int PageNum, ref int rowCount) { QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService(); return ss.SearchVideo(keyword, beginDate, endDate, Catalogid, Userid, PageSize, PageNum, ref rowCount); }
/// <summary> ///按关键字或视频编号,上传时间,分类搜索视频 /// </summary> /// <returns></returns> public static DataTable SearchVideo(string keyword, string beginDate, string endDate, string Catalogid, string Userid, int PageSize, int PageNum, ref int rowCount) { QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService(); return(ss.SearchVideo(keyword, beginDate, endDate, Catalogid, Userid, PageSize, PageNum, ref rowCount)); }
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); }
/// <summary> /// 删除图片信息 /// </summary> /// <param></param> /// <returns></returns> //public void Delete() //{ // string sql = "DELETE FROM ImageStorage WHERE ItemId ='" + this.ItemId + "'"; // SqlHelper.ExecuteNonQuery(SqlHelper.SqlCon_QJVRMS, CommandType.Text, sql); //} /// <summary> /// 修改图片信息 /// </summary> /// <param></param> /// <returns></returns> //public void Store() //{ // string sql = "UPDATE ImageStorage "; // sql = sql + " SET FileName='" + this.FileName + "'"; // sql = sql + " ,shotDate='" + this.shotDate + "'"; // sql = sql + " ,Keyword='" + this.Keyword + "'"; // sql = sql + " ,Description='" + this.Description + "'"; // sql = sql + " WHERE ItemId ='" + this.ItemId + "'"; // SqlHelper.ExecuteNonQuery(SqlHelper.SqlCon_QJVRMS, CommandType.Text, sql); // ImageStorageClass oImageStorageClass = new ImageStorageClass(); // oImageStorageClass.DeleteRelationshipImageAndCatalog(this.ItemId); //} /// <summary> /// 根据关键字搜索图片 add by dtf 5-30 /// 获取 ItemSerialNum,Hvsp 属性值 /// </summary> /// <returns></returns> //public static DataTable SearchImageByKeyword(string keyword, int PageSize, int PageNum, ref int rowCount) //{ // //return QJVRMS.DataAccess.ImageStorage.SearchImageByKeyword(keyword, PageSize, PageNum, ref rowCount); // QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService(); // return ss.SearchImageByKeyword(keyword, PageSize, PageNum, ref rowCount); //} /// <summary> ///按关键字或图片编号,上传时间,分类搜索图片 /// dailing /// </summary> /// <returns></returns> public static DataTable SearchImage(string keyword, string beginDate, string endDate, string Catalogid, string Userid, int PageSize, int PageNum, ref int rowCount) { //return QJVRMS.DataAccess.ImageStorage.SearchImage(keyword, uploadDate, shotDate, Catalogid,Userid, PageSize, PageNum, ref rowCount); QJVRMS.Business.SearchWS.SearchService ss = new QJVRMS.Business.SearchWS.SearchService(); return ss.SearchImage(keyword, beginDate, endDate, Catalogid, Userid, PageSize, PageNum, ref rowCount); }