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); } } }
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> <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) { } } }
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()); }
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(); }
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 = "暂无数据"; } } } } } }