public static string GetPageList(string Type, int NodeId, string SourceType, int ItemCount, int pageindex, int rows, string Sort) { ClsSearch cls = new ClsSearch(); List<int> hitlist = new List<int>(); List<xmlDataInfo> ie1 = null; if (SourceType.ToUpper().Substring(0, 2) == "YJ") { hitlist = ProYJDLL.YJDB.getYJItemByWID(Convert.ToInt32(NodeId), Convert.ToInt16(SourceType.Substring(2).ToString()), pageindex, rows); ItemCount = getItemCount(SourceType, NodeId, Type, ItemCount); ie1 = cls.GetResult(hitlist, Type.ToUpper()); switch (Sort) { case "PD|DESC": ie1 = ie1.OrderByDescending(x => x.StrPdOrGd.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; case "PD|AESC": ie1 = ie1.OrderBy(x => x.StrPdOrGd.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; case "AD|DESC": ie1 = ie1.OrderByDescending(x => x.StrApDate).ToList<xmlDataInfo>(); break; case "AD|AESC": ie1 = ie1.OrderBy(x => x.StrApDate).ToList<xmlDataInfo>(); break; default: ie1 = ie1.OrderByDescending(x => x.StrPubDate.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; } } else { SearchInterface.ClsSearch search = new SearchInterface.ClsSearch(); ie1 = search.getSearchData(XmPatentComm.strWebSearchGroupName, NodeId.ToString().PadLeft(3, '0'), Convert.ToInt32(System.Web.HttpContext.Current.Session["UserID"]), Type.ToUpper(), rows, pageindex, Sort); //foreach (xmlDataInfo rowData in ie1) //{ // rowData.StrPubDate = FormatDate(rowData.StrPubDate); //} switch (Sort) { case "PD|DESC": ie1 = ie1.OrderByDescending(x => x.StrPdOrGd.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; case "PD|AESC": ie1 = ie1.OrderBy(x => x.StrPdOrGd.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; case "AD|DESC": ie1 = ie1.OrderByDescending(x => x.StrApDate).ToList<xmlDataInfo>(); break; case "AD|AESC": ie1 = ie1.OrderBy(x => x.StrApDate).ToList<xmlDataInfo>(); break; default: ie1 = ie1.OrderByDescending(x => x.StrPubDate.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; } } return JsonHelper.ListToJson<xmlDataInfo>(ie1, "rows", ItemCount.ToString()); }
public static string GetPageList1(string Type, string NodeId, string SourceType, int ItemCount, int pageindex, int rows, string Sort, string isupdata) { ClsSearch cls = new ClsSearch(); List<int> hitlist = new List<int>(); List<xmlDataInfo> ie1 = null; if (SourceType.ToUpper().Substring(0, 2) == "YJ") { hitlist = ProYJDLL.YJDB.getYJItemByWID(Convert.ToInt32(NodeId), Convert.ToInt16(SourceType.Substring(2).ToString()), pageindex, rows); ItemCount = getItemCount(SourceType, Convert.ToInt32(NodeId), Type, ItemCount); ie1 = cls.GetResult(hitlist, Type.ToUpper()); switch (Sort) { case "PD|DESC": ie1 = ie1.OrderByDescending(x => x.StrPdOrGd.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; case "PD|AESC": ie1 = ie1.OrderBy(x => x.StrPdOrGd.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; case "AD|DESC": ie1 = ie1.OrderByDescending(x => x.StrApDate).ToList<xmlDataInfo>(); break; case "AD|AESC": ie1 = ie1.OrderBy(x => x.StrApDate).ToList<xmlDataInfo>(); break; default: ie1 = ie1.OrderByDescending(x => x.StrPubDate.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; } } else if (SourceType.ToUpper() == "DB") { DateTime time = DateTime.Now; List<ztresult> res = ztHelper.GetResultList(NodeId, Type, rows, pageindex, isupdata, out ItemCount); TimeSpan sp = DateTime.Now - time; Console.WriteLine(sp); time = DateTime.Now; foreach (var x in res) { hitlist.Add(x.pid); } ie1 = cls.GetResult(hitlist, Type.ToUpper()); sp = DateTime.Now - time; Console.WriteLine(sp); foreach (xmlDataInfo rowData in ie1) { ztresult x = (from y in res where y.pid.ToString() == rowData.StrSerialNo select y).First(); rowData.Iscore = x.star.ToString(); rowData.Form = x.strForm; } switch (Sort) { case "PD|DESC": ie1 = ie1.OrderByDescending(x => x.StrPdOrGd.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; case "PD|AESC": ie1 = ie1.OrderBy(x => x.StrPdOrGd.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; case "AD|DESC": ie1 = ie1.OrderByDescending(x => x.StrApDate).ToList<xmlDataInfo>(); break; case "AD|AESC": ie1 = ie1.OrderBy(x => x.StrApDate).ToList<xmlDataInfo>(); break; case "STAR": ie1 = (from e in ie1.AsEnumerable() orderby e.Iscore descending select e).ToList<xmlDataInfo>(); break; default: ie1 = ie1.OrderByDescending(x => x.StrPubDate.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; } } else { SearchInterface.ClsSearch search = new SearchInterface.ClsSearch(); ie1 = search.getSearchData(XmPatentComm.strWebSearchGroupName, NodeId.ToString().PadLeft(3, '0'), Convert.ToInt32(System.Web.HttpContext.Current.Session["UserID"]), Type.ToUpper(), rows, pageindex, Sort); //foreach (xmlDataInfo rowData in ie1) //{ // rowData.StrPubDate = FormatDate(rowData.StrPubDate); //} switch (Sort) { case "PD|DESC": ie1 = ie1.OrderByDescending(x => x.StrPdOrGd.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; case "PD|AESC": ie1 = ie1.OrderBy(x => x.StrPdOrGd.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; case "AD|DESC": ie1 = ie1.OrderByDescending(x => x.StrApDate).ToList<xmlDataInfo>(); break; case "AD|AESC": ie1 = ie1.OrderBy(x => x.StrApDate).ToList<xmlDataInfo>(); break; default: ie1 = ie1.OrderByDescending(x => x.StrPubDate.Replace("公开", "").Replace("公告", "")).ToList<xmlDataInfo>(); break; } } return JsonHelper.ListToJson<xmlDataInfo>(ie1, "rows", ItemCount.ToString()); }
public static string GetPageList(string Type, int NodeId, int pageindex, int rows, string filter, string Query) { ClsSearch cls = new ClsSearch(); List<int> hitlist = new List<int>(); int ItemCount; List<xmlDataInfo> ie1 = null; if (string.IsNullOrEmpty(Query)) { hitlist = UserCollectsHelper.GetResultList(Type, NodeId, pageindex, rows, out ItemCount, filter); } else { hitlist = UserCollectsHelper.GetResultList(Type, NodeId, pageindex, rows, out ItemCount, filter, Query); } ie1 = cls.GetResult(hitlist, Type.ToUpper()); foreach (xmlDataInfo rowData in ie1) { List<string> s = UserCollectsHelper.getNote(rowData.StrSerialNo, NodeId); rowData.Note = s[0]; rowData.NoteDate = s[1]; } ie1 = ie1.OrderByDescending(x => x.NoteDate).ToList<xmlDataInfo>(); return JsonHelper.ListToJson<xmlDataInfo>(ie1, "rows", ItemCount.ToString()); }