Esempio n. 1
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);
         }
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 读取检索结果的概要信息,按页读取
        /// </summary>
        /// <param name="SearchNo">检索编号(3位数字)</param>
        /// <param name="UserID">用户ID,7位,数据库中用户表存放的ID</param>
        /// <param name="strSearchDbType">中国专利检索为CN,世界EN</param>
        /// <param name="PageSize">每页显示的记录数</param>
        /// <param name="PageIndex">读取数据页码</param>
        /// <param name="SortExpression">排序字段,不排序可输入空字符串</param>
        /// <returns></returns>     
        public List<xmlDataInfo> getSearchData(string strGroupName, string SearchNo, int UserID, string strSearchDbType, int PageSize, int PageIndex, string SortExpression)
        {
            List<xmlDataInfo> lstXml = new List<xmlDataInfo>();
            xmlDataInfo item = new xmlDataInfo();

            Cpic.Cprs2010.Search.SearchPattern schPatItem = new Cpic.Cprs2010.Search.SearchPattern();
            schPatItem.SearchNo = SearchNo; ;  //检索编号[001-999]
            //检索式:F XX 2010/AD
            schPatItem.UserId = UserID;   //用户ID
            schPatItem.GroupName = strGroupName;
            strSearchDbType = strSearchDbType.ToUpper();

            switch (strSearchDbType.ToUpper())
            {
                case "CN":
                    schPatItem.DbType = Cpic.Cprs2010.Search.SearchDbType.Cn;
                    break;
                case "EN":
                case "WD":
                    schPatItem.DbType = Cpic.Cprs2010.Search.SearchDbType.DocDB; //检索数据
                    break;
                default:
                    return null;
            }

            lstXml = GetResultList(schPatItem, PageSize, PageIndex, SortExpression);

            return lstXml;
        }
Esempio n. 3
0
 /// <summary>
 /// 根据加密申请号获取著录项目数据信息
 /// </summary>
 /// <param name="AppNoX"></param>
 /// <returns></returns>
 public xmlDataInfo GetCnxmlDataInfoByAn(string AppNo, bool _isMegPubAnn)
 {
     xmlDataInfo resXmlInfo = new xmlDataInfo();
     try
     {
         resXmlInfo.StrApNo = AppNo;
         resXmlInfo.StrANX = UrlParameterCode_DE.encrypt(AppNo);
         if (!UpdateByCnXmlFile(resXmlInfo, _isMegPubAnn))
         {
             resXmlInfo = null;
         }
     }
     catch (Exception ex)
     {
         resXmlInfo = null;
         logger.Error(ex.ToString());
     }
     return resXmlInfo;
 }
Esempio n. 4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="_item"></param>
        /// <param name="strType"></param>
        /// <returns></returns>
        private bool UpdateByEnXmlFile(xmlDataInfo _item, bool _isDetails)
        {
            bool bRs = false;
            xmlDataInfo item = _item;
            try
            {

                XmlParser xmlParser = new XmlParser("", "UTF-8");
                DocDBIndexExtract docDBIndexExtract = new DocDBIndexExtract(xmlParser);
                String xmlContent = getEnMainXmlContent(item.StrPubNo);
                if (!xmlContent.Contains("exch:"))
                {
                    docDBIndexExtract.exch = "";
                }
                //logger.Debug(xmlContent);
                //xmlContent = Util.StringUtil.ReplaceLowOrderASCIICharacters(xmlContent);
                using (StringReader xmlString = new StringReader(xmlContent))
                {
                    using (XmlReader reader = XmlReader.Create(xmlString, xmlParser.Settings, xmlParser.Context))
                    {
                        XDocument xRoot = XDocument.Load(reader, LoadOptions.None);

                        //item.StrCountryCode = Cpic.Cprs2010.Cfg.DmManager.getCC_Display(docDBIndexExtract.getAppliesCountry(xRoot));

                        if (_isDetails)
                        {
                            item.StrApply = docDBIndexExtract.getAppliesAndCC(xRoot);
                            item.StrInventor = docDBIndexExtract.getInventorsAndCC(xRoot);
                            //item.TongZu = GetTongZu(item.StrPubNo, item.CPIC,1);
                        }
                        else
                        {
                            item.StrApply = docDBIndexExtract.getApplies(xRoot);
                            item.StrInventor = docDBIndexExtract.getInventors(xRoot);
                        }

                        item.StrPubDate = docDBIndexExtract.getPublicDate(xRoot);
                        item.StrFtUrl = getEnFtUrl(item.StrPubDate, item.StrPubNo);

                        /////------------
                        item.StrEpoApNo = docDBIndexExtract.getEpoApplyNo(xRoot);
                        item.StrOriginalApNo = docDBIndexExtract.getOriginalApplyNo(xRoot);
                        item.StrDocdbApNo = docDBIndexExtract.getDocdbApplyNo(xRoot);

                        item.StrDocdbPubNo = docDBIndexExtract.getDocdbPublicDocNo(xRoot);
                        item.StrEpoPubNo = docDBIndexExtract.getEpoPublicDocNo(xRoot);
                        item.StrOriginalPubNo = docDBIndexExtract.getOriginalPublicDocNo(xRoot);
                        //item.StrPubNo = docDBIndexExtract.getPublicDocNo(xRoot);
                        item.StrAbstr = docDBIndexExtract.getAbstract(xRoot);
                        item.StrAbsFmy = docDBIndexExtract.getFmyAbstract(xRoot);
                        item.StrRefDoc = docDBIndexExtract.getCited(xRoot);
                        item.StrPri = docDBIndexExtract.getEpoPriorAndPrd(xRoot);

                        item.StrEcla = docDBIndexExtract.getECLA(xRoot);

                        if (string.IsNullOrEmpty(item.StrTitle.Trim()))
                        {
                            item.StrTitle = docDBIndexExtract.getInventionTitle(xRoot);
                        }
                        if (string.IsNullOrEmpty(item.StrApDate))
                        {
                            item.StrApDate = docDBIndexExtract.getApplyDate(xRoot);
                        }
                    }
                }

                item.StrApDate = XmPatentComm.FormatDateVlue(item.StrApDate);
                item.StrPubDate = item.StrPdOrGd = XmPatentComm.FormatDateVlue(item.StrPubDate);
                item.StrPnOrGn = item.StrPubNo;
                item.StrMainIPC = item.StrIpc.Split(';')[0];
                bRs = true;
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
                bRs = false;
            }
            return bRs;
        }
Esempio n. 5
0
        /// <summary>
        /// 填充中文数据
        /// </summary>
        /// <param name="_item"></param>
        /// <param name="strType"></param>
        /// <returns></returns>
        private bool UpdateByCnXmlFile(xmlDataInfo _item, bool _isMegPubAnn)
        {
            bool bRs = false;

            xmlDataInfo xmlInfoitem = _item;
            try
            {
                XmlParser xmlParser = new XmlParser("", "GB2312");
                CnIndexExtract cnIndexExtract = new CnIndexExtract();

                String xmlContent = getCnMainXmlContent(xmlInfoitem.StrApNo);
                xmlContent = Util.StringUtil.ReplaceLowOrderASCIICharacters(xmlContent);
                using (StringReader xmlString = new StringReader(xmlContent))
                {
                    using (XmlReader reader = XmlReader.Create(xmlString, xmlParser.Settings, xmlParser.Context))
                    {
                        XDocument xRoot = XDocument.Load(reader, LoadOptions.None);

                        xmlInfoitem.StrAgency = Cpic.Cprs2010.Cfg.DmManager.getAG_Display(cnIndexExtract.getAgency(xRoot));
                        xmlInfoitem.StrAgency_Addres = Cpic.Cprs2010.Cfg.DmManager.getAG_Addres(cnIndexExtract.getAgency(xRoot));
                        xmlInfoitem.StrDaiLiRen = cnIndexExtract.getAgents(xRoot);
                        xmlInfoitem.StrAnnDate = XmPatentComm.FormatDateVlue(cnIndexExtract.getAnnouncementDate(xRoot));
                        xmlInfoitem.StrAnnNo = cnIndexExtract.getAnnouncementNo(xRoot);
                        xmlInfoitem.StrApply = cnIndexExtract.getApply(xRoot);
                        xmlInfoitem.StrCountryCode = Cpic.Cprs2010.Cfg.DmManager.getCC_Display(cnIndexExtract.getProvinceCode(xRoot));
                        xmlInfoitem.StrFiled = cnIndexExtract.getField(xRoot);
                        xmlInfoitem.StrInventor = cnIndexExtract.getInventor(xRoot);
                        xmlInfoitem.StrPri = cnIndexExtract.getPriorNo(xRoot);

                        xmlInfoitem.StrPubDate = XmPatentComm.FormatDateVlue(cnIndexExtract.getPublicDate(xRoot));
                        xmlInfoitem.StrPubNo = cnIndexExtract.getPublicNo(xRoot);
                        if (_isMegPubAnn)
                        {
                            //xmlInfoitem.StrPubDate = getPubApdDate(xmlInfoitem.StrPubDate, xmlInfoitem.StrAnnDate);
                            //xmlInfoitem.StrPubNo = getPubApdNo(xmlInfoitem.StrPubNo, xmlInfoitem.StrAnnNo);
                        }
                        else
                        {
                            xmlInfoitem.StrTitle = cnIndexExtract.getTitle(xRoot);
                            //xmlInfoitem.StrApNo = cnIndexExtract.getApplyNo(xRoot);
                            xmlInfoitem.StrApDate = XmPatentComm.FormatDateVlue(cnIndexExtract.getApplyDate(xRoot));
                            //xmlInfoitem.StrANX = UrlParameterCode_DE.encrypt(xmlInfoitem.StrApNo.Trim());  //add by xiwl
                        }
                        xmlInfoitem.StrPdOrGd = getPubApdDate(xmlInfoitem.StrPubDate, xmlInfoitem.StrAnnDate);
                        xmlInfoitem.StrPnOrGn = getPubApdNo(xmlInfoitem.StrPubNo, xmlInfoitem.StrAnnNo);

                        xmlInfoitem.StrIpc = cnIndexExtract.getIPC(xRoot);
                        xmlInfoitem.StrFtUrl = string.Format("http://211.160.117.105/bns/comm/getimg.aspx?idx={0}&Ty=CNG", xmlInfoitem.StrANX);
                        //item.StrAbstr = cnIndexExtract.getAbstract(xRoot);//.Length >= 140 ? cnIndexExtract.getAbstract(xRoot).Substring(0, 140) : string.IsNullOrEmpty(cnIndexExtract.getAbstract(xRoot)) ? "无" : cnIndexExtract.getAbstract(xRoot);
                        xmlInfoitem.StrAbstr = cnIndexExtract.getAbstract(xRoot);
                        xmlInfoitem.StrAbstr = string.IsNullOrEmpty(xmlInfoitem.StrAbstr) ? "无" : xmlInfoitem.StrAbstr;

                        xmlInfoitem.StrClaim = cnIndexExtract.getMainClaim(xRoot);
                        xmlInfoitem.Brief = GetBriefInfo(xmlInfoitem.StrApNo);
                        xmlInfoitem.TongZu = "";   // GetTongZu(xmlInfoitem.StrPubNo, xmlInfoitem.CPIC);
                        xmlInfoitem.ZhuanLiLeiXing = getZhuanLiLeiXing(xmlInfoitem.StrApNo);

                        xmlInfoitem.StrMainIPC = cnIndexExtract.getMainIPC(xRoot);

                        if (xmlInfoitem.ZhuanLiLeiXing.Equals("3"))
                        {
                            string pubDate = System.Web.HttpUtility.UrlEncode(cnIndexExtract.getAnnouncementDate(xRoot));
                            xmlInfoitem.StrFtUrl = string.Format("http://211.160.117.105/bns/comm/getimg.aspx?idx={0}&Ty=CNG&ImgTp=wg&pd={1}", xmlInfoitem.StrANX, pubDate);

                            xmlInfoitem.StrMainIPC = XmPatentComm.RevertDegIpc(xmlInfoitem.StrMainIPC);
                            string strIpcTmp = "";
                            foreach (string strItem in xmlInfoitem.StrIpc.Split(";".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
                            {
                                strIpcTmp += XmPatentComm.RevertDegIpc(strItem) + ";";
                            }
                            xmlInfoitem.StrIpc = strIpcTmp.TrimEnd(';');
                        }
                        xmlInfoitem.StrApNo = string.Format("{0}.{1}", xmlInfoitem.StrApNo.Trim(), CnAppLicationNo.getValidCode(xmlInfoitem.StrApNo)); //add by xiwl;
                        xmlInfoitem.FaLvZhuangTai = "../my/frmFLZT.aspx?AppNo=" + xmlInfoitem.StrANX;

                        xmlInfoitem.StrShenQingRenDiZhi = cnIndexExtract.getAddress(xRoot);

                        _item.StrApDate = XmPatentComm.FormatDateVlue(_item.StrApDate);

                        xmlInfoitem.StrFtUrl += _isMegPubAnn ? "" : "&bg=";
                    }
                }
                bRs = true;
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
                bRs = false;
            }
            return bRs;
        }
Esempio n. 6
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 = "暂无数据";
                        }
                    }
                }
            }
        }
    }