Example #1
0
        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());
        }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["Ids"] != null && Request.QueryString["Ids"] != "")
         {
             if (Request.QueryString["type"] == null)
             {
                 type = "CN";
             }
             else
             {
                 type = Request.QueryString["type"].ToString();
             }
             string[] arrayId = Request.QueryString["Ids"].Split(new string[]{"|"}, StringSplitOptions.RemoveEmptyEntries);
             List<xmlDataInfo> lst = new List<xmlDataInfo>();
             foreach (string strId in arrayId)
             {
                 SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
                 //if (search.GetResultByAppNo(strId).Count > 0)
                 //{
                 xmlDataInfo currentXmlDataInfo = new xmlDataInfo();
                 if (type == "CN")
                 {
                     currentXmlDataInfo = search.GetCnxmlDataInfo(strId);
                     gonggao.Visible = true;
                 }
                 else
                 {
                     currentXmlDataInfo = search.GetEnxmlDataInfo(strId);
                     gonggao.Visible = false;
                 }
                 lst.Add(currentXmlDataInfo);
                 string titleA = currentXmlDataInfo.StrTitle;
                 if (titleA.Length > 30)
                 {
                     titleA = titleA.Substring(0, 30) + "……";
                 }
                 DropDownListPatentA.Items.Add(new ListItem(titleA, strId));
                 DropDownListPatentB.Items.Add(new ListItem(titleA, strId));
                 //}
             }
             ViewState["List"] = lst;
             if (DropDownListPatentA.Items.Count > 0)
             {
                 DropDownListPatentA.SelectedIndex = 0;
             }
             if (DropDownListPatentB.Items.Count > 1)
             {
                 DropDownListPatentB.SelectedIndex = 1;
             }
             ShowPatentA(DropDownListPatentA.SelectedIndex);
             ShowPatentB(DropDownListPatentB.SelectedIndex);
         }
     }
 }
Example #3
0
    public static IEnumerable tableSearch(string strSearchQuery, string NodeId,string type,string stype)
    {
        string strResutlMsg = "";
        try
        {

           // string strQuery = System.Web.HttpUtility.UrlDecode(strSearchQuery.Trim());
            string strQuery =strSearchQuery.Trim();
            //检索
            int intCount = 0;
            int userid = Convert.ToInt32(System.Web.HttpContext.Current.Session["UserID"]);
            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
            string strHits = search.GetSearchDataHits(SearchInterface.XmPatentComm.strWebSearchGroupName,strQuery, userid, type.ToUpper());
            string strNo = string.Empty;

            if (strHits == "ERROR")
            {
                return "请求错误";
            }

            if (strHits.IndexOf("(") >= 0 && strHits.IndexOf(")") > 0)
            {
                strNo = strHits.Substring(strHits.IndexOf("(") + 1, strHits.IndexOf(")") - strHits.IndexOf("(") - 1);
            }
            if (strHits.IndexOf("<hits:") >= 0 && strHits.IndexOf(">") > 0)
            {
                intCount = Convert.ToInt32(strHits.Substring(strHits.IndexOf("<hits:") + 6, strHits.IndexOf(">") - strHits.IndexOf("<hits:") - 6).Trim());
            }

            if (intCount == 0) return "0";

            SearchPattern sp = new SearchPattern();
            sp.SearchNo = strNo;
            sp.Pattern = strQuery;
            if (type.ToUpper() == "CN")
            {
                sp.DbType = SearchDbType.Cn;
            }
            else
            {
                sp.DbType = SearchDbType.DocDB;
            }
            sp.UserId = userid;
            strResutlMsg = Merge(sp, NodeId, type, stype);

        }
        catch (Exception ex)
        {
            strResutlMsg = "请求错误";

        }
        return strResutlMsg;
    }
Example #4
0
 public static string getAutoBiaoYin(string strANX)
 {
     string strRs = "";
     try
     {
         SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
         strRs = search.GetBiaoYin(strANX);
     }
     catch (Exception ex)
     {
         strRs = "未加载标引内容";
     }
     return strRs;
 }
Example #5
0
    public static string Search(string strSearchQuery, string type)
    {
        string strResutlMsg = "";
        try
        {

            string strQuery = System.Web.HttpUtility.UrlDecode(strSearchQuery.Trim());
            //检索
            int intCount = 0;
            int userid = Convert.ToInt32(System.Web.HttpContext.Current.Session["UserID"]);
            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
            string strHits = search.GetSearchDataHits(SearchInterface.XmPatentComm.strWebSearchGroupName, strQuery, userid, type.ToUpper());
            string strNo = string.Empty;

            if (strHits == "ERROR")
            {
                return "请求错误";
            }
            if (strHits.IndexOf("(") >= 0 && strHits.IndexOf(")") > 0)
            {
                strNo = strHits.Substring(strHits.IndexOf("(") + 1, strHits.IndexOf(")") - strHits.IndexOf("(") - 1);
            }
            if (strHits.IndexOf("<hits:") >= 0 && strHits.IndexOf(">") > 0)
            {
                intCount = Convert.ToInt32(strHits.Substring(strHits.IndexOf("<hits:") + 6, strHits.IndexOf(">") - strHits.IndexOf("<hits:") - 6).Trim());
            }

            return intCount.ToString();

        }
        catch (Exception ex)
        {
            strResutlMsg = "请求错误";

        }
        return strResutlMsg;
    }
Example #6
0
        public static string getFamily(string appno, string pageNumber, string pageSize, string CPIC)
        {
            int pindex = Convert.ToInt32(pageNumber);
            int Psize = Convert.ToInt32(pageSize);
            string strappno = appno;
            int intid = Convert.ToInt32(CPIC);
            ResultDataManagerDataContext db = new ResultDataManagerDataContext();
            Table<Cpic.Cprs2010.Search.ResultData.DocdbDocInfo> tbDocdbInfo = db.DocdbDocInfo;

            var tmp = (from item in tbDocdbInfo
                       where intid != 0 && item.CPIC.Equals(intid)
                       select item).Skip(Psize * (pindex - 1)).Take(Psize);
            List<enfml> result = (from item in tmp
                                  select new enfml
                                  {
                                      ANX = string.Empty,
                                      apno = item.PubID,
                                      title = item.Title
                                  }).ToList<enfml>();
            int count = (from item in tbDocdbInfo
                         where intid != 0 && item.CPIC.Equals(intid)
                         select item).Count();

            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();

            foreach (var x in result)
            {

                x.ANX = UrlParameterCode_DE.encrypt(x.apno);

                try
                {
                    if (string.IsNullOrEmpty(x.title.Trim()))
                    {
                        x.title = search.GetEnxmlDataInfo(x.ANX).StrTitle;
                    }
                }
                catch (Exception ex) { }
            }

            return JsonHelper.ListToJson<enfml>(result, "rows", count.ToString());
        }
Example #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string strApNo = Request.QueryString["Id"].Trim();
        string doctype = Request.QueryString["tp"].Trim();

        SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();

        Cpic.Cprs2010.Search.ResultData.xmlDataInfo currentXmlDataInfo = null;
        string templatefilePath = "";
        String temfile = "";
        FileInfo DownloadFile = null;
        String guid = "";
        RTFChange rtf = new RTFReplace.RTFChange();

        temfile = System.Web.HttpContext.Current.Server.MapPath("") + "\\PatentDetails_" + Guid.NewGuid().ToString() + ".Doc";

        string strDowFileName = "file";

        switch (doctype.ToUpper())
        {
            case "CN":
                #region cnDown
                templatefilePath = System.Web.HttpContext.Current.Server.MapPath("cn_template.rtf");

                FileInfo templateFile = new FileInfo(templatefilePath);

                templateFile.CopyTo(temfile, true);
                DownloadFile = new FileInfo(temfile);
                currentXmlDataInfo = search.GetCnxmlDataInfo(strApNo);

                rtf.RTFileChange(temfile, "%applyNo%", currentXmlDataInfo.StrApNo);
                rtf.RTFileChange(temfile, "%applyDate %", currentXmlDataInfo.StrApDate);
                rtf.RTFileChange(temfile, "%pubNo%", currentXmlDataInfo.StrPubNo);
                rtf.RTFileChange(temfile, "%pubDate%", currentXmlDataInfo.StrPubDate);
                rtf.RTFileChange(temfile, "%announceNo%", currentXmlDataInfo.StrAnnNo);
                rtf.RTFileChange(temfile, "%announceDate%", currentXmlDataInfo.StrAnnDate);
                rtf.RTFileChange(temfile, "%grountDate%", currentXmlDataInfo.StrAnnDate);
                rtf.RTFileChange(temfile, "%grantpubDate%", currentXmlDataInfo.StrAnnDate);
                rtf.RTFileChange(temfile, "%city%", currentXmlDataInfo.StrCountryCode);
                rtf.RTFileChange(temfile, "%field%", currentXmlDataInfo.StrFiled);
                rtf.RTFileChange(temfile, "%agency%", currentXmlDataInfo.StrAgency);
                rtf.RTFileChange(temfile, "%agent%", currentXmlDataInfo.StrDaiLiRen);
                rtf.RTFileChange(temfile, "%agencyAddress%", currentXmlDataInfo.StrAgency_Addres);
                rtf.RTFileChange(temfile, "%apply%", currentXmlDataInfo.StrApply);
                rtf.RTFileChange(temfile, "%address%", currentXmlDataInfo.StrShenQingRenDiZhi);                  //tbd
                rtf.RTFileChange(temfile, "%code%", "");                //tdb
                rtf.RTFileChange(temfile, "%inventor%", currentXmlDataInfo.StrInventor);

                rtf.RTFileChange(temfile, "%ipc%", currentXmlDataInfo.StrIpc);
                rtf.RTFileChange(temfile, "%ecla%", "");
                rtf.RTFileChange(temfile, "%ucla%", "");
                rtf.RTFileChange(temfile, "%title%", currentXmlDataInfo.StrTitle);
                rtf.RTFileChange(temfile, "%abs%", currentXmlDataInfo.StrAbstr);
                rtf.RTFileChange(temfile, "%claim%", currentXmlDataInfo.StrClaim);
                rtf.RTFileChange(temfile, "%pri%", currentXmlDataInfo.StrPri);

                rtf.RTFileChange(temfile, "%url%", Request.UrlReferrer.ToString());

                #endregion
                strDowFileName = currentXmlDataInfo.StrApNo;
                break;
            case "DEN":
                #region DENDown
                templatefilePath = System.Web.HttpContext.Current.Server.MapPath("DEN_template.rtf");

                templateFile = new FileInfo(templatefilePath);

                templateFile.CopyTo(temfile, true);
                DownloadFile = new FileInfo(temfile);
                currentXmlDataInfo = search.GetEnxmlDataInfo(strApNo);

                rtf.RTFileChange(temfile, "%applyNo%", currentXmlDataInfo.StrApNo);
                rtf.RTFileChange(temfile, "%applyDate %", currentXmlDataInfo.StrApDate);
                rtf.RTFileChange(temfile, "%pubNo%", currentXmlDataInfo.StrPubNo);
                rtf.RTFileChange(temfile, "%pubDate%", currentXmlDataInfo.StrPubDate);

                rtf.RTFileChange(temfile, "%apply%", currentXmlDataInfo.StrApply);
                rtf.RTFileChange(temfile, "%inventor%", currentXmlDataInfo.StrInventor);
                rtf.RTFileChange(temfile, "%ipc%", currentXmlDataInfo.StrIpc);

                rtf.RTFileChange(temfile, "%title%", currentXmlDataInfo.StrTitle);
                rtf.RTFileChange(temfile, "%abs%", currentXmlDataInfo.StrAbstr);
                rtf.RTFileChange(temfile, "%refdoc%", currentXmlDataInfo.StrRefDoc);
                rtf.RTFileChange(temfile, "%pri%", currentXmlDataInfo.StrPri);
                rtf.RTFileChange(temfile, "%url%", Request.UrlReferrer.ToString());

                #endregion
                strDowFileName = currentXmlDataInfo.StrPubNo;
                break;
        }

        System.Web.HttpContext.Current.Response.Clear();
        System.Web.HttpContext.Current.Response.ClearHeaders();
        System.Web.HttpContext.Current.Response.Buffer = false;
        System.Web.HttpContext.Current.Response.ContentType = "application/octet-stream";
        System.Web.HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(strDowFileName + ".doc", System.Text.Encoding.UTF8));
        System.Web.HttpContext.Current.Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
        System.Web.HttpContext.Current.Response.WriteFile(temfile);
        System.Web.HttpContext.Current.Response.Flush();
        System.Web.HttpContext.Current.Response.End();
    }
Example #8
0
    public static IEnumerable DoPatSearch(string strSearchQuery, string _strSdbType, string _sDoSrc)
    {
        string[] strArryResutlMsg = { "", "0", "0" };  //0:msg, 1:sno, 2:hiscount
        try
        {
            //User userInfor = (User)new Page().Session["Userinfo"];
            //if (userInfor == null)  // 判断用户登录
            //{
            //    logger.Info("用户已退出,请重新登录");
            //    return "用户已退出,请重新登录";
            //}

            string strQuery = System.Web.HttpUtility.UrlDecode(strSearchQuery.Trim()).Trim();
            //string strQuery = strSearchQuery.Trim();
            //return "(001)F TI 计算机 <hit:20>"; // 测试用

            SearchDbType sdbType = SearchDbType.DocDB;

            /*----------- 申请号校验位判断 begin---------------*/
            // 用正则式抓取
            if (_strSdbType.ToUpper().Equals("CN"))
            {
                //(19|20)[123]\d{9}\.?[\d|X|x]?
                Regex reg = new Regex(@"(\d{12}\.?[\d|x|X])\s*\/AN|AN\s+(\d{12}\.?[\d|x|X])", RegexOptions.IgnoreCase);
                MatchCollection mc = reg.Matches(strQuery);
                foreach (Match m in mc)
                {
                    string eachAn = m.Groups[1].Value;
                    if (eachAn == "" || eachAn == null)
                        eachAn = m.Groups[2].Value;
                    // 送验证
                    bool ifValidate = CnAppLicationNo.Check_ApNoAddVCode(eachAn);
                    if (!ifValidate)
                    {
                        strArryResutlMsg[0] = "申请号校验位错误";
                        return strArryResutlMsg;
                    }
                    string newAn = eachAn.Length == 13 ? eachAn.Substring(0, 12) : eachAn.Substring(0, eachAn.IndexOf('.'));
                    strQuery = strQuery.Replace(eachAn, newAn);
                }

                sdbType = SearchDbType.Cn;
            }
            /*----------- 申请号校验位判断 end---------------*/
            //HttpContext.Current.User.Identity.IsAuthenticated
            // 送检索
            if (System.Web.HttpContext.Current.Session["UserID"] == null)
            {
                strArryResutlMsg[0] = "您的会话已退出,请重新登录!";
            }
            else
            {
                string strPageUName = System.Web.HttpContext.Current.Session["UserID"].ToString().Trim();
                SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
                ResultInfo res = search.DoSearch(SearchInterface.XmPatentComm.strWebSearchGroupName, strQuery, Convert.ToInt32(strPageUName), sdbType);
                string strResutlMsg = res.HitMsg;
                if (strResutlMsg.IndexOf("<hits:") != -1 && _sDoSrc != "-1") // 返回结果正确
                {
                    // 设置检索历史    ***-1连接检索不记历史
                    //userInfor.addSearchHis(schPatItem);
                    Pattern.InsertPattern(Convert.ToInt32(strPageUName), Convert.ToByte(_sDoSrc), Convert.ToByte(sdbType.GetHashCode()),
                        res.SearchPattern.SearchNo, res.SearchPattern.Pattern, res.HitCount, DateTime.Now);
                }

                strArryResutlMsg[0] = strResutlMsg.Substring(strResutlMsg.IndexOf("(" + res.SearchPattern.SearchNo + ")"));
                strArryResutlMsg[1] = res.SearchPattern.SearchNo;
                strArryResutlMsg[2] = res.HitCount.ToString();
                //logger.Info(strResutlMsg);
            }

        }
        catch (Exception ex)
        {
            strArryResutlMsg[0] = "请求错误";
            logger.Error(ex.ToString());
        }
        return strArryResutlMsg;
    }
Example #9
0
        private string GetPatentAvgAge(List<int> lst)
        {
            string avgage = "0";
            List<xmlDataInfo> ie1 = null;
            ClsSearch cls = new ClsSearch();
            List<xmlDataInfo> lstRs = new List<xmlDataInfo>();
            int num = lst.Count / 500;
            if (lst.Count % 500 > 0)
            {
                num = num + 1;
            }
            for (int i = 0; i < num; i++)
            {
                List<int> ls = lst.Skip(i * 500).Take(500).ToList<int>();
                ie1 = cls.GetRestultAge(ls);
                lstRs = lstRs.Union(ie1).ToList<xmlDataInfo>();

            }
            //ie1=cls.GetResult(lst,"CN");
            int age = 0;
            foreach (xmlDataInfo data in lstRs)
            {
                if (!string.IsNullOrEmpty(data.ZLNl))
                {
                    age = age + int.Parse(data.ZLNl);
                }
            }
            if (lstRs.Count() != 0)
            {
                avgage = (age / lstRs.Count()).ToString();
            }
            return avgage;
        }
Example #10
0
    /// <summary>
    /// 更新专题库节点绑定的检索式
    /// </summary>
    /// <param name="id">检索式id</param>
    /// <param name="SearchPattern">检索式</param>
    /// <param name="Hit">命中篇数</param>
    /// <param name="nodeid">节点id</param>
    /// <param name="type">数据类型 cn en</param>
    /// <returns></returns>
    public static string UpdateSearchPattern(string id, string SearchPattern, int Hit, string nodeid, string type)
    {
        string result = "succ";
        try
        {
            //检索
            int intCount = 0;
            //int userid = Convert.ToInt32(System.Web.HttpContext.Current.Session["Userid"].ToString());
            int userid = 1;
            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
            string strHits = search.GetSearchDataHits("", SearchPattern, userid, type.ToUpper());
            if (strHits == "ERROR") return "ERROR";
            string strNo = string.Empty;
            if (strHits.IndexOf("(") >= 0 && strHits.IndexOf(")") > 0)
            {
                strNo = strHits.Substring(strHits.IndexOf("(") + 1, strHits.IndexOf(")") - strHits.IndexOf("(") - 1);
            }
            if (strHits.IndexOf("<hits:") >= 0 && strHits.IndexOf(">") > 0)
            {
                intCount = Convert.ToInt32(strHits.Substring(strHits.IndexOf("<hits:") + 6, strHits.IndexOf(">") - strHits.IndexOf("<hits:") - 6).Trim());
            }
            //判断结果是否太大
            if (intCount > 5000)
            {
                result = "对不起,检索式检索结果大于5000,请修改检索式,缩小检索结果范围";
                return result;
            }
            //获取检索结果
            SearchPattern schPatItem = new SearchPattern();
            schPatItem.SearchNo = strNo; ;  //检索编号[001-999]
            //检索式:F XX 2010/AD
            schPatItem.UserId = userid;   //用户ID
            if (type.ToUpper() == "CN")
            {
                schPatItem.DbType = SearchDbType.Cn;
            }
            else
            {
                schPatItem.DbType = SearchDbType.DocDB;
            }
            ResultServices res = new ResultServices();
            List<int> lst = res.GetResultList(schPatItem, "");
            List<string> nodids = new List<string>();
            nodids.Add(nodeid);
            //
            // 更新 除了核心专利+来源是 “检索式” 的删除标记
            //
            using (SqlConnection conn = DBA.SqlDbAccess.GetSqlConnection())
            {
                conn.Open();
                ////删除旧的数据
                SqlTransaction trans = conn.BeginTransaction();
                //string delztdb = string.Format("update ztdb set isdel=1 where (iscore =0 and [Form] ='检索式') and Nid='{0}' and type='{1}'", nodeid, type);
                //DBA.SqlDbAccess.ExecNoQuery(trans, CommandType.Text, delztdb);

                ////添加新的数据
                //AddToTH(trans, lst, nodids, "检索式", userid.ToString(), type);
                WriteZTCNP(nodeid, type, "0", lst);

                //更新检索式
                string SQL = string.Format("update ztsp set sp ='{0}',Hit={1} where id={2}", SearchPattern.Replace("'", "''"), intCount, id.Replace("'", "''"));
                DBA.SqlDbAccess.ExecNoQuery(trans, CommandType.Text, SQL);

                trans.Commit();
            }

        }
        catch (Exception ex)
        {
            result = "failed";
        }
        return result;
    }
Example #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
                {
                    string strFormatUrl = "<a href='frmDoSq.aspx?db=EN&Query=F XX ({0}/{1})' target='_blank'>{2}</a>";
                    //string strFormatUrl = "<span re='frmDoSq.aspx?db=EN&Query=F XX ({0}/{1})' >{2}</span>";
                    string strFoumatTrans = "<span>{0}</span> &nbsp;&nbsp;<a href='javascript:void(0);' onclick=\"transABS(this,'','EN')\"><img title='翻译' src='../images/Trans_20.jpg' /></a>";
                    //frmDoSq.aspx?db=EN&Query=F XX (20030623/AD)

                    SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
                    xmlDataInfo currentXmlDataInfo = search.GetEnxmlDataInfo(Request.QueryString["Id"].Trim());

                    LiteralTitle.Text = string.IsNullOrEmpty(currentXmlDataInfo.StrTitle) ? "无" : string.Format(strFoumatTrans, currentXmlDataInfo.StrTitle);
                    LiteralApDate.Text = string.Format(strFormatUrl, Server.UrlEncode(frmPatDetails.EncodeDate(currentXmlDataInfo.StrApDate)),
                        "AD", currentXmlDataInfo.StrApDate);

                    LiteralInventor.Text = XmPatentComm.getSplitString(currentXmlDataInfo.StrInventor, "IN", "EN");
                    LiteralApply.Text = XmPatentComm.getSplitString(currentXmlDataInfo.StrApply, "PA", "EN");
                    LiteralSimilar.Text = FormateDisPlayTz(currentXmlDataInfo.StrPubNo, currentXmlDataInfo.CPIC); // ShowSimilar(currentXmlDataInfo.TongZu);

                    LiteralIpc.Text = XmPatentComm.getSplitString(currentXmlDataInfo.StrIpc, "IC", "EN");

                    //LiteralPubNo.Text = getDispLayValues(currentXmlDataInfo.StrPubNo, currentXmlDataInfo.StrEpoPubNo, currentXmlDataInfo.StrOriginalPubNo, "PN");
                    //LiteralApNo.Text = getDispLayValues(currentXmlDataInfo.StrDocdbApNo, currentXmlDataInfo.StrEpoApNo, currentXmlDataInfo.StrOriginalApNo, "AN");

                    LiteralPubNo.Text = getDispLayValues(currentXmlDataInfo.StrPubNo, currentXmlDataInfo.StrOriginalPubNo, "PN");
                    LiteralApNo.Text = getDispLayValues(currentXmlDataInfo.StrEpoApNo, currentXmlDataInfo.StrOriginalApNo, "AN");
                    btnActiveTab.Attributes.Add("apno", currentXmlDataInfo.StrEpoApNo);
                    LinkButtonDownload.ToolTip = currentXmlDataInfo.StrPubNo;

                    if (currentXmlDataInfo.StrPubDate.StartsWith("000") || currentXmlDataInfo.StrPubDate == "")
                    {
                        LiteralPubDate.Text = "";
                    }
                    else
                    {
                        LiteralPubDate.Text = string.Format(strFormatUrl, Server.UrlEncode(frmPatDetails.EncodeDate(currentXmlDataInfo.StrPubDate)),
                            "PD", currentXmlDataInfo.StrPubDate);
                    }

                    LiteralImageFt.Text = string.Format("<img id='ImageFt' src='../Images/loding_imgFt.gif' onload=\"resizeFt(this,'{0}')\" alt='摘要附图'/>", currentXmlDataInfo.StrFtUrl);

                    LiteralPri.Text = currentXmlDataInfo.StrPri;

                    litAbs.Text = string.IsNullOrEmpty(currentXmlDataInfo.StrAbstr) ? "" : string.Format(strFoumatTrans, currentXmlDataInfo.StrAbstr);

                    litRef.Text = currentXmlDataInfo.StrRefDoc;

                    litFmyAbs.Text = currentXmlDataInfo.StrAbsFmy;

                    litEcla.Text = currentXmlDataInfo.StrEcla;

                    btnActiveTab.ToolTip = currentXmlDataInfo.StrSerialNo;

                    //自定义标注
                    BindUserCollect(currentXmlDataInfo.StrSerialNo);
                }
            }
            catch (Exception ex)
            {
            }
        }
    }
Example #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
                    {
                        string strFormatUrl = "<a href='frmDoSq.aspx?db=CN&Query=F XX ({0}/{1})' target='_blank'>{2}</a>";
                        //string strFormatUrl = "<span re='frmDoSq.aspx?db=CN&Query=F XX ({0}/{1})' >{2}</span>";
                        string strFoumatTrans = "<span>{0}</span> &nbsp;&nbsp;<a href='javascript:void(0);' onclick=\"transABS(this,'','CN')\"><img title='翻译' src='../images/Trans_20.jpg' /></a>";

                        //frmDoSq.aspx?db=CN&Query=F XX (20030623/AD)
                        SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
                        xmlDataInfo currentXmlDataInfo = search.GetCnxmlDataInfo(Request.QueryString["Id"].Trim());

                        LiteralTitle.Text = string.Format(strFoumatTrans, currentXmlDataInfo.StrTitle);
                        LiteralApDate.Text = string.Format(strFormatUrl, Server.UrlEncode(EncodeDate(currentXmlDataInfo.StrApDate)), "AD", currentXmlDataInfo.StrApDate);
                        LiteralApNo.Text = currentXmlDataInfo.StrApNo;
                        LiteralInventor.Text = XmPatentComm.getSplitString(currentXmlDataInfo.StrInventor, "IN", "CN");
                        LiteralApply.Text = XmPatentComm.getSplitString(currentXmlDataInfo.StrApply, "PA", "CN");
                        LiteralCountryCode.Text = currentXmlDataInfo.StrCountryCode;
                        LiteralAdds.Text = currentXmlDataInfo.StrShenQingRenDiZhi;
                        LiteralPubNo.Text = currentXmlDataInfo.StrPubNo;
                        if (currentXmlDataInfo.StrPubDate.StartsWith("000") || currentXmlDataInfo.StrPubDate == "")
                        {
                            LiteralPubDate.Text = currentXmlDataInfo.StrPubDate;
                        }
                        else
                        {
                            LiteralPubDate.Text = string.Format(strFormatUrl, Server.UrlEncode(EncodeDate(currentXmlDataInfo.StrPubDate)), "PD", currentXmlDataInfo.StrPubDate);
                        }
                        LiteralAnnNo.Text = currentXmlDataInfo.StrAnnNo;

                        if (currentXmlDataInfo.StrAnnDate.StartsWith("000") || currentXmlDataInfo.StrAnnDate == "")
                        {
                            LiteralAnnDate.Text = currentXmlDataInfo.StrAnnDate;
                        }
                        else
                        {
                            LiteralAnnDate.Text = string.Format(strFormatUrl, Server.UrlEncode(EncodeDate(currentXmlDataInfo.StrAnnDate)), "GD", currentXmlDataInfo.StrAnnDate);
                        }

                        LiteralAgency.Text = currentXmlDataInfo.StrAgency;
                        LiteralAgent.Text = currentXmlDataInfo.StrDaiLiRen;

                        try
                        {
                            LiteralMainIpc.Text = string.Format(strFormatUrl, Server.UrlEncode(Util.FormatUtil.FormatIPC(currentXmlDataInfo.StrMainIPC)), "MC", currentXmlDataInfo.StrMainIPC);
                        }
                        catch (Exception exx)
                        {
                            LiteralMainIpc.Text = currentXmlDataInfo.StrMainIPC;
                        }

                        LiteralIpc.Text = XmPatentComm.getSplitString(currentXmlDataInfo.StrIpc, "IC", "CN");
                        LiteralBrief.Text = string.Format(strFoumatTrans, currentXmlDataInfo.StrAbstr);
                        ltraPro.Text = currentXmlDataInfo.StrPri;

                        LiteralImageFt.Text = string.Format("<img id='ImageFt' src='../Images/loding_imgFt.gif' onload=\"resizeFt(this,'{0}')\" alt='摘要附图'/>", currentXmlDataInfo.StrFtUrl);

                        LabelClaim.Text = string.IsNullOrEmpty(currentXmlDataInfo.StrClaim) ? "无" : string.Format(strFoumatTrans, currentXmlDataInfo.StrClaim);

                        if (currentXmlDataInfo.ZhuanLiLeiXing.Equals("3"))
                        {
                            //labAbsJYSM.Text = "简要说明:";
                        }

                        btnActiveTab.ToolTip = currentXmlDataInfo.CPIC;
                        //标引
                        //LabelAuto.Text = search.GetBiaoYin(Request.QueryString["Id"]);

                        //BindUserCollect(currentXmlDataInfo.CPIC);
                    }
                }
                catch (Exception ex)
                {
                }
            }
        }
Example #13
0
        protected void LinkButtonDownload_Click(object sender, EventArgs e)
        {
            String strFileName = LiteralApNo.Text;  // "PatentDetails_" + DateTime.Today.ToString("yyyyMMdd");

            string strComma = ",";
            string strNewLine = Environment.NewLine;

            StringBuilder sbContent = new StringBuilder();
            bool success = false;

            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
            switch (hidActiveTabTi.Value)
            {
                case "著录项目信息"://著录信息
                    Response.Redirect(string.Format("ptdownload.aspx?Id={0}&tp=cn", Request.QueryString["Id"]));
                    break;
                case "PDF全文"://PDF
                    //Response.Redirect(search.getInfoByPatentID(Request.QueryString["Id"], "CN", "2"));
                    break;
                case "权利要求"://代码化全文

                    sbContent.Append(LiteralRights.Text);

                    Page.Response.Clear();
                    success = ResponseFile(Page.Request, Page.Response, strFileName + "_C.html", sbContent.ToString(), 1024000);
                    if (success)
                    {
                        //LiteralHint.Text = "成功";
                    }
                    break;
                case "说明书"://代码化全文
                    sbContent.Append(LiteralBook.Text);
                    Page.Response.Clear();
                    success = ResponseFile(Page.Request, Page.Response, strFileName + "_D.html", sbContent.ToString(), 1024000);
                    if (success)
                    {
                        //LiteralHint.Text = "成功";
                    }
                    break;
                case "法律状态"://法律状态
                    sbContent.Append("申请号");
                    sbContent.Append(strComma);
                    sbContent.Append("法律状态公告日");
                    sbContent.Append(strComma);
                    sbContent.Append("法律状态");
                    sbContent.Append(strComma);
                    sbContent.Append("详细信息");
                    SearchInterface.WSFLZT.CnLegalStatus[] currentDataSet = search.getFalvZhuangTai(Request.QueryString["Id"]);
                    if (currentDataSet != null)
                    {
                        foreach (var item in currentDataSet)
                        {
                            sbContent.Append(strNewLine);
                            sbContent.Append("'" + item.SHENQINGH);
                            sbContent.Append(strComma);
                            sbContent.Append(item.LegalDate);
                            sbContent.Append(strComma);
                            sbContent.Append(item.LegalStatusInfo);
                            sbContent.Append(strComma);
                            sbContent.Append(item.LegalStatusInfo + ";" + item.DETAIL);
                        }
                    }

                    Page.Response.Clear();
                    success = ResponseFile(Page.Request, Page.Response, strFileName + "_L.csv", sbContent.ToString(), 1024000);
                    if (success)
                    {
                        //LiteralHint.Text = "成功";
                    }
                    break;
            }
        }
Example #14
0
        //private void BindUserCollect(string _strPid)
        //{
        //    try
        //    {
        //        string strSql = "select a.CollectId,a.AlbumId, b.Title as floder,a.Note,a.NoteDate from TLC_Collects a, TLC_Albums b where a.Pid={0} and a.AlbumId=b.AlbumId  and a.UserId={1} and a.NoteDate<>'' and a.[Type]='CN'";
        //        //string strPid = Request.QueryString["PID"].Trim(); //8779247
        //        GridView1.DataSource = DBA.SqlDbAccess.GetDataTable(CommandType.Text, string.Format(strSql, _strPid, Convert.ToInt32(Session["UserID"])));
        //        GridView1.DataBind();
        //    }
        //    catch (Exception ex)
        //    {
        //    }
        //}
        /// <summary>
        /// TAb切换
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnActiveTab_Click(object sender, EventArgs e)
        {
            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();

            switch (hidActiveTabTi.Value)
            {
                // <li><a href="#tabMianXml">著录项目信息</a></li>
                //<li><a href="#TabDegImgs">外观图形</a></li>
                //<li><a href="#DivtabPdf">全文PDF</a></li>
                //<li><a href="#divTabDes">说明书</a></li>
                //<li><a href="#divTabClams">权利要求</a></li>
                //<li><a href="#divTabLegal">法律状态</a></li>
                case "外观图形":
                    if (LiteralPictureList.Text == "Loading......")
                    {
                        if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
                        {
                            LiteralPictureList.Text = string.Format("<iframe id='irmWgIms' src='frmDesignImgs.aspx?Id={0}' frameborder='0' width='100%' height='660'></iframe>", Request.QueryString["Id"]);
                        }
                    }
                    LinkButtonDownload.Visible = false;
                    break;
                case "全文PDF":
                    if (LiteralPdf.Text == "Loading......")
                    {
                        if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
                        {
                            #region closed.....
                            //string strPdfUrls = search.getInfoByPatentID(Request.QueryString["Id"], "CN", "2");
                            //string[] strArryPdfUrls = strPdfUrls.Split('|');
                            //StringBuilder strBud = new StringBuilder();
                            //for (int i = 0; i < strArryPdfUrls.Length; i++)
                            //{
                            //    if (strArryPdfUrls[i].Contains("0ACN"))
                            //    {
                            //        string pdfInfo = "公开文本";
                            //        //strBud.Append(string.Format("<a id='hrf{2}' href='{1}' target='_blank' onclick='return LoadPdf(this)'>公开文本[{0}]</a>&nbsp;&nbsp;",
                            //        //    bnsFiles[i].Substring(bnsFiles[i].LastIndexOf('/') + 1, 34), bnsFiles[i], i + 1));
                            //        strBud.Append(string.Format("<a id='hrf{0}' href='{1}' target='_blank' onclick='return LoadPdf(this)'>" + pdfInfo + "</a>&nbsp;&nbsp;", i + 1, strArryPdfUrls[i]));
                            //    }
                            //    else
                            //    {
                            //        string pdfInfo = "公告文本";
                            //        //strBud.Append(string.Format("<a id='hrf{2}' href='{1}' target='_blank' onclick='return LoadPdf(this)'>公告文本[{0}]</a>&nbsp;&nbsp;",
                            //        //    bnsFiles[i].Substring(bnsFiles[i].LastIndexOf('/') + 1, 34), bnsFiles[i], i + 1));
                            //        strBud.Append(string.Format("<a id='hrf{0}' href='{1}' target='_blank' onclick='return LoadPdf(this)'>" + pdfInfo + "</a>&nbsp;&nbsp;", i + 1, strArryPdfUrls[i]));
                            //    }
                            //}
                            //LiteralPdf.Text = string.Format("", "");
                            //LiteralPdf.Text = "<object classid=\"clsid:CA8A9780-280D-11CF-A24D-444553540000\" width=\"900\" height=\"600\" border=\"0\"><param name=\"_Version\" value=\"65539\"><param name=\"_ExtentX\" value=\"20108\"><param name=\"_ExtentY\" value=\"10866\"><param name=\"_StockProps\" value=\"0\"><param name=\"SRC\" value=\"" + search.getInfoByPatentID(Request.QueryString["Id"], "CN", "2") + "\"><object align=\"center\" data=\"" + search.getInfoByPatentID(Request.QueryString["Id"], "CN", "2") + "\" type=\"application/pdf\" width=\"900\" height=\"600\"></object></object>";

                            //<form name="form1" method="post" action="GetBns.aspx?PNo=APP6CCA6DDA9HBA9GFF9EFB9GEB9ICB9EDB9GHH9IGG3BAA5CBA&amp;type=CN" id="form1">
                            //string strCprsPdfUrls = "<form id='frmPdf_1' method='post' action='http://202.106.92.181/cprs2010/docdb/GetBns.aspx?PNo=APP{0}&type=CN'></form><script type='text/javascript'>alter(document.getElementById('frmPdf_1'))</script>";
                            //LiteralPdf.Text = string.Format(strCprsPdfUrls, Request.QueryString["Id"].Trim());
                            //LiteralPdf.Text = "<div><form id='aspnetForm' name='aspnetForm' method='post' action='http://202.106.92.181/cprs2010/docdb/GetBns.aspx?PNo=APP&type=CN'></form></div>";

                            //LiteralPdf.Mode = LiteralMode.Encode;
                            #endregion

                            LiteralPdf.Text = "<div id='divPfpage'>Loading......</div>";
                            string strCprsPdfUrlPage = string.Format("http://211.160.117.105/bns/comm/GetBns.aspx?PNo=APP{0}&type=CN", Request.QueryString["Id"].Trim());
                            //string strCprsPdfUrlPage = string.Format("http://202.106.92.181/cprs2010/docdb/GetBns.aspx?PNo=APP{0}&type=CN", Request.QueryString["Id"].Trim());

                            //System.Net.WebClient MyWebClient = new System.Net.WebClient();
                            //MyWebClient.Encoding = System.Text.Encoding.UTF8;
                            //string strRs = MyWebClient.DownloadString(strCprsPdfUrlPage);
                            ////LiteralPdf.Text = strRs;
                            //ScriptManager.RegisterStartupScript(this, this.GetType(), "LiteralPdf", "LoadPdfFile('divPfpage','" + strCprsPdfUrlPage + "')", true);
                            //HiddenField1Pdf.Value = strRs;
                            //strCprsPdfUrlPage = "http://pdfobject.com/examples/simplest-styled.html";
                            LiteralPdf.Text = string.Format("<iframe id='irmPdf' src='{0}' style='z-index:0;' frameborder='0' width='100%' height='600'></iframe>", strCprsPdfUrlPage);
                        }
                    }
                    LinkButtonDownload.Visible = false;
                    break;
                case "权利要求":
                    if (LiteralRights.Text == "Loading......")
                    {
                        if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
                        {
                            //LiteralRights.Text = search.getInfoByPatentID(Request.QueryString["Id"], "CN", "0");
                            string xmltext = search.getInfoByPatentID(Request.QueryString["Id"], "CN", "0");

                            if (xmltext.StartsWith("ERROR:"))
                            {
                                LiteralRights.Text = xmltext;
                            }
                            else
                            {
                                MSXML2.DOMDocument30Class xml = new MSXML2.DOMDocument30Class();
                                MSXML2.DOMDocument30Class xslt = new MSXML2.DOMDocument30Class();
                                //xmltext=xmltext.Replace("<![CDATA[<math>", "<math>").Replace("</math>]]>", "</math>");
                                xml.loadXML(xmltext);

                                XmlDocument doc = new XmlDocument();
                                doc.Load(Server.MapPath("~") + "\\newcss\\claims.xsl");
                                string xsltext = doc.InnerXml;

                                xslt.loadXML(xsltext);
                                LiteralRights.Text = xml.transformNode(xslt).Replace("charset=UTF-16", "charset=GB2312");
                            }
                        }
                    }
                    LinkButtonDownload.Visible = UserRight.getVisibleRight(Session["UserID"].ToString(), "QWXZ");
                    break;
                case "说明书":
                    if (LiteralBook.Text == "Loading......")
                    {
                        if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
                        {
                            LiteralBook.Text = search.getInfoByPatentID(Request.QueryString["Id"], "CN", "1");
                        }
                    }
                    LinkButtonDownload.Visible = UserRight.getVisibleRight(Session["UserID"].ToString(), "QWXZ");
                    break;
                case "法律状态":
                    if (LiteralLeagl.Text == "Loading......")
                    {

                        SearchInterface.WSFLZT.CnLegalStatus[] currentDataSet = search.getFalvZhuangTai(Request.QueryString["Id"]);
                        if (currentDataSet != null)
                        {
                            GridViewLegal.DataSource = currentDataSet;
                            GridViewLegal.DataBind();
                        }
                    }
                    LiteralLeagl.Text = "";
                    GridViewLegal.Visible = true;
                    LinkButtonDownload.Visible = UserRight.getVisibleRight(Session["UserID"].ToString(), "FLZTXZ");
                    break;
                case "引文信息":
                    if (LiteralQuote.Text == "Loading......")
                    {
                        if (LiteralAnnNo.Text != null && LiteralAnnNo.Text != "")
                        {
                            string yzInf = search.getYZInf(LiteralAnnNo.Text);
                            if (!yzInf.Equals(""))
                            {
                                if (yzInf.IndexOf("@@@") > 0)
                                {
                                    LiteralQuote.Text = yzInf.Replace("@@@", "<br />");
                                }
                                else
                                {
                                    LiteralQuote.Text = yzInf;
                                }
                            }
                            else
                            {
                                LiteralQuote.Text = "暂无数据";
                            }
                            //LiteralQuote.Text = yzInf == "" ? "暂无数据" : yzInf;
                        }
                        else
                        {
                            LiteralQuote.Text = "暂无数据";
                        }
                    }
                    LinkButtonDownload.Visible = true;
                    break;
            }
        }
Example #15
0
    /// <summary>
    /// 对专题库节点添加检索式&并对检索式进行检索入库。
    /// 注:大于5000条的检索式 不允许插入。
    /// </summary>
    /// <param name="NodeId">节点id</param>
    /// <param name="SearchPattern">检索式</param>
    /// <param name="Hit">命中篇数</param>
    /// <param name="type">数据类型 cn en</param>
    /// <returns></returns>
    public static string addSearchPattern1(string NodeId, string SearchPattern, string Hit, string type, string zid)
    {
        string result = "succ";

        try
        {
            //检索
            int intCount = 0;
            //int userid = Convert.ToInt32(System.Web.HttpContext.Current.Session["Userid"].ToString());
            int userid = 1;
            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
            string strHits = search.GetSearchDataHits("", SearchPattern, userid, type.ToUpper());
            if (strHits == "ERROR") return "ERROR";
            string strNo = string.Empty;
            if (strHits.IndexOf("(") >= 0 && strHits.IndexOf(")") > 0)
            {
                strNo = strHits.Substring(strHits.IndexOf("(") + 1, strHits.IndexOf(")") - strHits.IndexOf("(") - 1);
            }
            if (strHits.IndexOf("<hits:") >= 0 && strHits.IndexOf(">") > 0)
            {
                intCount = Convert.ToInt32(strHits.Substring(strHits.IndexOf("<hits:") + 6).Trim('>').Trim());
            }
            //判断结果是否太大
            if (intCount > 50000)
            {
                result = "对不起,检索式检索结果大于50000,请缩小修改检索式,缩小检索结果范围";
                return result;
            }
            //获取检索结果
            SearchPattern schPatItem = new SearchPattern();
            schPatItem.SearchNo = strNo; ;  //检索编号[001-999]
            //检索式:F XX 2010/AD
            schPatItem.UserId = userid;   //用户ID
            if (type.ToUpper() == "CN")
            {
                schPatItem.DbType = SearchDbType.Cn;
            }
            else
            {
                schPatItem.DbType = SearchDbType.DocDB;
            }
            ResultServices res = new ResultServices();
            List<int> lst = res.GetResultList(schPatItem, "");
            List<string> nodids = new List<string>();
            nodids.Add(NodeId);
            //添加到ztdb中
            using (SqlConnection conn = DBA.SqlDbAccess.GetSqlConnection())
            {
                conn.Open();
                SqlTransaction tran = conn.BeginTransaction();
                if (intCount > 0)
                {
                    //AddToTH(tran, lst, nodids, "检索式", userid.ToString(), type);
                    WriteZTCNP(NodeId, type, "0", lst);
                }
                string SQL = string.Format("insert into ztsp (Nid,sp,Hit,Type,isdel,zid) values ('{0}','{1}',{2},'{3}',0,'{4}')", NodeId, SearchPattern, intCount, type, zid);
                DBA.SqlDbAccess.ExecNoQuery(tran, CommandType.Text, SQL);
                tran.Commit();
            }

        }
        catch (Exception ex)
        {
            result = "失败:" + ex.Message;
        }
        return result;
    }
Example #16
0
    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());
    }
Example #17
0
    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());
    }
Example #18
0
    /// <summary>
    /// TAb切换
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnActiveTab_Click(object sender, EventArgs e)
    {
        SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();

        switch (hidActiveTabTi.Value)
        {
            // <li><a href="#tabMianXml">著录项目信息</a></li>
            //<li><a href="#TabDegImgs">外观图形</a></li>
            //<li><a href="#DivtabPdf">全文PDF</a></li>
            //<li><a href="#divTabDes">说明书</a></li>
            //<li><a href="#divTabClams">权利要求</a></li>
            //<li><a href="#divTabLegal">法律状态</a></li>
            case "全文PDF":
                if (LiteralPdf.Text == "Loading......")
                {
                    if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
                    {
                        LiteralPdf.Text = "<div id='divPfpage'>Loading......</div>";
                        string strCprsPdfUrlPage = btnActiveTab.Attributes["apno"].StartsWith("CN") ? "EAP" + btnActiveTab.Attributes["apno"] : Request.QueryString["Id"].Trim();
                        //bns_xm/comm/;cprs2010/docdb/
                        strCprsPdfUrlPage = string.Format("http://202.106.92.181/bns_xm/comm/GetBns.aspx?PNo={0}&type=WD{1}", strCprsPdfUrlPage, getEpoPdfUrlParameter());
                        //strCprsPdfUrlPage = string.Format("http://211.160.117.105/bns_xm/comm/GetBns.aspx?PNo={0}&type=WD{1}", strCprsPdfUrlPage, getEpoPdfUrlParameter());

                        //strCprsPdfUrlPage = "http://pdfobject.com/examples/simplest-styled.html";
                        //epo pdf :http://worldwide.espacenet.com/maximizedOriginalDocument?flavour=maximizedPlainPage&locale=en_EP&FT=D&date=20070712&CC=US&NR=2007161985A1&KC=A1
                        LiteralPdf.Text = string.Format("<iframe id='irmPdf' src='{0}' style='z-index:0;' frameborder='0' width='100%' height='600'></iframe>", strCprsPdfUrlPage);
                    }
                }
                LinkButtonDownload.Visible = false;
                break;
            case "权利要求":
                if ( LiteralRights.Text == "Loading......" )
                {
                    if ( Request.QueryString["Id"] != null && Request.QueryString["Id"] != "" )
                    {
                        LiteralRights.Text = "暂无数据";
                    }
                }
                LinkButtonDownload.Visible = true;
                break;
            case "说明书":
                if ( LiteralBook.Text == "Loading......" )
                {
                    if ( Request.QueryString["Id"] != null && Request.QueryString["Id"] != "" )
                    {
                        LiteralBook.Text = "暂无数据";
                    }
                }
                LinkButtonDownload.Visible = true;
                break;
            case "法律状态":
                if (LiteralLeagl.Text == "Loading......")
                {
                    if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
                    {
                        if (btnActiveTab.Attributes["apno"].StartsWith("CN"))
                        {
                            ////frmLawInfo.aspx?Idx=9FCA3CBA8BGA9AHB9DFA6DDA9EHD9DHE9IFG9GGF4DAA9HCE
                            LiteralLeagl.Text = string.Format("<iframe id='irmLagel' src='frmLawInfo.aspx?Idx={0}' style='z-index:0;' frameborder='0' width='100%' height='600'></iframe>",
                              Cpic.Cprs2010.Cfg.UrlParameterCode_DE.encrypt(Cpic.Cprs2010.Cfg.Data.cnDataService.FormatEpoToCNApNo(btnActiveTab.Attributes["apno"])));

                        }
                        else
                        {
                            LiteralLeagl.Text = string.Format("<iframe id='irmLagel' src='{0}comm/epo_legal.aspx?pubno={1}' style='z-index:0;' frameborder='0' width='100%' height='600'></iframe>",
                               XmPatentComm.strUrlDome, Cpic.Cprs2010.Cfg.UrlParameterCode_DE.DecryptionAll(Request.QueryString["Id"]));
                            LiteralLeagl.Text = XmPatentComm.getLegalWebUrl(Cpic.Cprs2010.Cfg.UrlParameterCode_DE.DecryptionAll(Request.QueryString["Id"])) + LiteralLeagl.Text;
                        }

                    }
                }
                LinkButtonDownload.Visible = UserRight.getVisibleRight(Session["UserID"].ToString(), "FLZTXZ");
                break;
            case "引文信息":
                if (LiteralQuote_1.Text == "Loading......")
                {
                    if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
                    {
                        //LiteralQuote.Text = "暂无数据";
                        LiteralQuote_1.Text = search.GetEnCitedWithSrepPhase(Request.QueryString["Id"].Trim(), "APP", "is").Replace (";", "<br />");
                    }
                }
                if (LiteralQuote_2.Text == "Loading......")
                {
                    if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
                    {
                        //LiteralQuote.Text = "暂无数据";
                        LiteralQuote_2.Text = search.GetEnCitedWithSrepPhase(Request.QueryString["Id"].Trim(), "APP", "not").Replace(";", "<br />");
                    }
                }
                LinkButtonDownload.Visible = true;
                break;
        }
    }
Example #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
            {
                String strId = Request.QueryString["Id"].Trim();
                String type = Request.QueryString["type"];
                if (type == null || type.Equals("")) {
                    type = "CN";
                }
                else {
                    type = type.Trim();
                }
                String select = Request.QueryString["select"];
                if (select == null || select.Equals("")) {
                    select = "0";
                }
                else {
                    select = select.Trim();
                }
                String patType = Request.QueryString["patType"];
                if (patType == null || patType.Equals(""))
                {
                    patType = "0";
                }
                else
                {
                    patType = patType.Trim();
                }

                SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
                xmlDataInfo currentXmlDataInfo = new xmlDataInfo();
                if (type == "CN") {
                    //if (System.Text.RegularExpressions.Regex.IsMatch(currentXmlDataInfo.StrApNo, @"(^.{2}3.{5}.*$)|(^.{2}3.{5}\..$)|(^.{4}3.{7}.*$)|(^.{4}3.{7}\..$)"))
                    if (patType == "1")
                    {
                        DropDownListPatentPart.Items.Add(new ListItem("著录项目", "divMain"));
                        DropDownListPatentPart.Items.Add(new ListItem("摘要信息", "divAbs"));
                        DropDownListPatentPart.Items.Add(new ListItem("摘要附图", "divBrief"));
                        DropDownListPatentPart.Items.Add(new ListItem("法律状态", "divLegal"));
                    }
                    else
                    {
                        DropDownListPatentPart.Items.Add(new ListItem("著录项目", "divMain"));
                        DropDownListPatentPart.Items.Add(new ListItem("权利要求", "divClaim"));
                        DropDownListPatentPart.Items.Add(new ListItem("说明书", "divDes"));
                        DropDownListPatentPart.Items.Add(new ListItem("摘要信息", "divAbs"));
                        DropDownListPatentPart.Items.Add(new ListItem("摘要附图", "divBrief"));
                        DropDownListPatentPart.Items.Add(new ListItem("法律状态", "divLegal"));
                        DropDownListPatentPart.Items.Add(new ListItem("引文信息", "divQuote"));
                    }

                    currentXmlDataInfo = search.GetCnxmlDataInfo(strId);
                    gonggao.Visible = true;
                } else {
                    DropDownListPatentPart.Items.Add(new ListItem("著录项目", "divMain"));
                    DropDownListPatentPart.Items.Add(new ListItem("摘要信息", "divAbs"));
                    DropDownListPatentPart.Items.Add(new ListItem("摘要附图", "divBrief"));
                    DropDownListPatentPart.Items.Add(new ListItem("法律状态", "divLegal"));
                    DropDownListPatentPart.Items.Add(new ListItem("引文信息", "divQuote"));

                    currentXmlDataInfo = search.GetEnxmlDataInfo(strId);
                    gonggao.Visible = false;
                }

                //if (int.Parse(select) > DropDownListPatentPart.Items.Count)
                //{
                //    select = DropDownListPatentPart.Items.Count.ToString();
                //}
                //DropDownListPatentPart.SelectedIndex = int.Parse (select);
                if (select == "0") {
                    DropDownListPatentPart.SelectedIndex = 0;
                }
                else if (type == "CN" && patType == "1") {
                    DropDownListPatentPart.SelectedIndex = 1;
                }
                else if (type == "EN") {
                    DropDownListPatentPart.SelectedIndex = 1;
                }
                else {
                    DropDownListPatentPart.SelectedIndex = int.Parse(select);
                }

                LiteralTitleA.Text = "<a href='frmPatDetails.aspx?Id=" + currentXmlDataInfo.StrANX + "' target='_blank' >" + currentXmlDataInfo.StrTitle + "</a>";

                LiteralApDateA.Text = currentXmlDataInfo.StrApDate;
                LiteralApNoA.Text = currentXmlDataInfo.StrApNo;
                LiteralInventorA.Text = currentXmlDataInfo.StrInventor;
                LiteralApplyA.Text = currentXmlDataInfo.StrApply;
                LiteralCountryCodeA.Text = currentXmlDataInfo.StrCountryCode;
                LiteralPubNoA.Text = currentXmlDataInfo.StrPubNo;
                LiteralPubDateA.Text = currentXmlDataInfo.StrPubDate;
                LiteralAnnNoA.Text = currentXmlDataInfo.StrAnnNo;
                LiteralAnnDateA.Text = currentXmlDataInfo.StrAnnDate;
                LiteralAddsA.Text = currentXmlDataInfo.StrShenQingRenDiZhi;
                litYSQ_A.Text = currentXmlDataInfo.StrPri;

                LiteralAbs.Text = currentXmlDataInfo.StrAbstr;
                //LiteralBrief.ImageUrl = currentXmlDataInfo.StrFtUrl;
                LiteralImageFt.Text = string.Format("<img id='ImageFt' src='../Images/loding_imgFt.gif' onload=\"resizeFt(this,'{0}')\" alt='摘要附图'/>", currentXmlDataInfo.StrFtUrl);

                if (!gonggao.Visible) {
                    litFlzt_A.Text = string.Format("<iframe id='irmLagel' src='{0}comm/epo_legal.aspx?pubno={1}' style='z-index:0;' frameborder='0' width='100%' height='300'></iframe>",
                        SearchInterface.XmPatentComm.strUrlDome, currentXmlDataInfo.StrANX);

                    string strLiteralQuote_1 = search.GetEnCitedWithSrepPhase(Request.QueryString["Id"].Trim(), "APP", "is").Replace(";", "<br />");
                    string strLiteralQuote_2 = search.GetEnCitedWithSrepPhase(Request.QueryString["Id"].Trim (), "APP", "not").Replace(";", "<br />");
                    LiteralQuote.Text = "<p><strong>申请人引用:</strong></p>" + strLiteralQuote_1 + "<hr align=\"center\" width=\"100%\" size=\"1\" style=\"margin: 10px 0;\" /><p><strong>非申请人引用:</strong></p>" + strLiteralQuote_2;
                } else {
                    litFlzt_A.Text = string.Format("<iframe id='irmLagel' src='/my/frmLawInfo.aspx?Idx={0}' style='z-index:0;' frameborder='0' width='100%' height='300'></iframe>",
                        currentXmlDataInfo.StrANX);

                    if (LiteralQuote.Text == "Loading......")
                    {
                        if (LiteralAnnNoA.Text != null && LiteralAnnNoA.Text != "")
                        {
                            string yzInf = search.getYZInf(LiteralAnnNoA.Text);
                            if (!yzInf.Equals(""))
                            {
                                if (yzInf.IndexOf("@@@") > 0)
                                {
                                    LiteralQuote.Text = yzInf.Replace("@@@", "<br />");
                                }
                                else
                                {
                                    LiteralQuote.Text = yzInf;
                                }
                            }
                            else
                            {
                                LiteralQuote.Text = "暂无数据";
                            }
                        }
                        else
                        {
                            LiteralQuote.Text = "暂无数据";
                        }
                    }
                }
            }
        }
    }