Ejemplo n.º 1
0
    /// <summary>
    /// 中国专利法律状态检索
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnChaXunFL_Click(object sender, EventArgs e)
    {
        Patentquery.WSFLZT.Service ss = new Patentquery.WSFLZT.Service();
        Patentquery.WSFLZT.ResultInfo result = new Patentquery.WSFLZT.ResultInfo();
        int UserID = Convert.ToInt32(Session["UserID"]);

        string AppNo = txtAppNoFL.Text.ToString().Trim().ToUpper().Replace("CN", "").Replace(".", "");
        if (AppNo.Length > 8)
        {
            if (AppNo.Substring(0, 1) == "0")
            {
                if (AppNo.Length == 9)
                {
                    AppNo = AppNo.Substring(0, 8);
                }
            }

            if (AppNo.Substring(0, 1) == "2")
            {
                if (AppNo.Length == 13)
                {
                    AppNo = AppNo.Substring(0, 12);
                }
            }
            if (AppNo.Substring(0, 1) == "9" || AppNo.Substring(0, 1) == "8")
            {
                if (AppNo.Length == 9)
                {
                    AppNo = AppNo.Substring(0, 8);
                }
            }
        }

        txtAppNoFL.Text = AppNo;

        result = ss.QueryFaLvZT(txtAppNoFL.Text.ToString().Trim(), txtGongGaoR.Text.ToString().Trim(), txtFaLvZT.Text.ToString().Trim(), txtZhuanLiQR.Text.ToString().Trim(), UserID);

        int hitCount = result.HitCount;

        Patentquery.WSFLZT.SearchPattern strPatern = result.SearchPattern;
        string SearchNo = strPatern.SearchNo;

        string strURL = "LawQueryResult.aspx?type=falv&hitCount=" + hitCount + "&SearchNo=" + SearchNo + "&";

        strURL += getURL("AppNo", txtAppNoFL);
        strURL += getURL("GongGaoR", txtGongGaoR);
        strURL += getURL("FaLvZT", txtFaLvZT);
        strURL += getURL("ZhuanLiQR", txtZhuanLiQR);

        strURL = strURL.TrimEnd('&');

        if (!strURL.Contains("&"))
        {
            return;
        }

        Response.Redirect(strURL);
    }