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
    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();
    }
Esempio n. 3
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)
                {
                }
            }
        }
Esempio n. 4
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 = "暂无数据";
                        }
                    }
                }
            }
        }
    }