예제 #1
0
 partial void DeleteC_W_SECARCH(C_W_SECARCH instance);
예제 #2
0
 partial void UpdateC_W_SECARCH(C_W_SECARCH instance);
예제 #3
0
파일: YJDB.cs 프로젝트: xy19xiaoyu/TG
        /// <summary>
        /// 预警信息从表新增
        /// </summary>
        /// <param name="C_ID"></param>
        /// <param name="S_NAME"></param>
        /// <param name="TYPE"></param>
        public static string YjInsertItem(int C_ID, string S_NAME, string S_Name2, string GuoJia, string ShiJie, int TYPE, string C_TYPE, string country,string hangyeid,string keytopvalue)
        {
            string patent = "";
            C_W_SECARCH cwSearch = new C_W_SECARCH();
            cwSearch.C_ID = C_ID;
            cwSearch.S_NAME = S_NAME;
            cwSearch.TYPE = TYPE;
            cwSearch.NID = hangyeid;
            string pattern = "";
            string pattern1 = "";
            List<int> lstZhuanTi = new List<int>();
            string zhiliang = "";
            switch (C_TYPE.Substring(0,1))
            {
                case "1"://行业
                    //专题库中取出检索式
                    //string cnpfile=ztHelper.GetZTCNP(hangyeid,country,"0");
                    //cwSearch.SEARCHFILE =
                    //lstZhuanTi=ztHelper.GetResultList(hangyeid, country, "0");
                    pattern = "";
                   //S_NAME = S_NAME.Replace("(", " ").Replace(")", " ").Replace("."," ");
                    //cwSearch.PATTERN = "F XX (" + S_NAME + "/PA)";
                    break;
                case "2"://申请人
                    if (!string.IsNullOrEmpty(hangyeid))
                    {
                        S_NAME = S_NAME.Substring(S_NAME.IndexOf("(") + 1, S_NAME.IndexOf(")") - S_NAME.IndexOf("(") - 1);
                        //cwSearch.S_NAME = S_NAME;
                    }
                    pattern = S_NAME + "/PA";
                    //cwSearch.PATTERN = "F XX (" + S_NAME + "/PA)";
                    //S_NAME = S_NAME.Replace("(", " ").Replace(")", " ").Replace(".", " ");
                    //cwSearch.PATTERN = "F XX (" + S_NAME + "/IC)";
                    break;
                case "3"://区域
                    if (country == "CN")
                    {
                        string shi = S_NAME.Substring(S_NAME.IndexOf("(") + 1, S_NAME.IndexOf(")") - S_NAME.IndexOf("(") - 1);
                        string sheng = S_NAME.Substring(0, S_NAME.IndexOf("("));

                        shi = shi.TrimEnd('市');
                        sheng = sheng.TrimEnd('省').TrimEnd('市');
                        string DanLieShi = getJiHuaDanLieShi(shi);
                        if (DanLieShi != "")//计划单列市
                        {
                            //cwSearch.PATTERN = "F XX (" + DanLieShi + "/CO)";
                            pattern = DanLieShi + "/CO";
                        }
                        else
                        {
                            //cwSearch.PATTERN = "F XX ((" + shi + "/DZ)*(" + getJiHuaDanLieShi(sheng) + "/CO))";
                            pattern = "(" + shi + "/DZ)*(" + getJiHuaDanLieShi(sheng) + "/CO)";
                        }
                    }

                    if (country == "EN")
                    {
                        string guoJiaEn = S_NAME.Substring(0, S_NAME.IndexOf("("));
                        string IPCEn = S_NAME.Substring(S_NAME.IndexOf("(") + 1, S_NAME.IndexOf(")") - S_NAME.IndexOf("(") - 1);
                        pattern = "(" + IPCEn + "/IC)@CO=" + getShiJieCode(guoJiaEn);
                        //cwSearch.PATTERN = "F XX (" + IPCEn + "/IC)@CO=" + getShiJieCode(guoJiaEn) + "";// "F XX (" + S_NAME + "/CO)";
                    }
                    //S_NAME = S_NAME.Replace("(", " ").Replace(")", " ").Replace(".", " ");
                    //cwSearch.PATTERN = "F XX (" + S_NAME + "/IN)";
                    break;
                case "4"://发明人
                    S_NAME = S_NAME.Replace("(", " ").Replace(")", " ").Replace(".", " ");
                    pattern = S_NAME + "/IN";
                    //cwSearch.PATTERN = "F XX (" + S_NAME + "/IN)";
                    break;
                case "5"://来华
                    S_NAME = S_NAME.Replace("(", " ").Replace(")", " ").Replace(".", " ");
                    cwSearch.PATTERN = C_TYPE.Substring(0,1);
                    cwSearch.PATTERN = "F XX ((" + S_NAME + "/PA)*(" + GuoJia + "/CO))";
                    break;
                case "6"://自定义
                    cwSearch.PATTERN = S_NAME;
                    break;
                default:
                    cwSearch.PATTERN = C_TYPE.Substring(0,1);
                    break;

            }
            //子项
            if (TYPE == 0)
            {
                cwSearch.S_NAME = keytopvalue;
                switch (C_TYPE.Substring(1, 1))
                {
                    case "0"://专利投入
                        break;
                    case "1"://成果
                        break;
                    case "2"://市场重心
                        if (country == "CN")
                        {
                            string shi = keytopvalue.Substring(keytopvalue.IndexOf("(") + 1, keytopvalue.IndexOf(")") - keytopvalue.IndexOf("(") - 1);
                            string sheng = keytopvalue.Substring(0, keytopvalue.IndexOf("("));

                            shi = shi.TrimEnd('市');
                            sheng = sheng.TrimEnd('省').TrimEnd('市');
                            string DanLieShi = getJiHuaDanLieShi(shi);
                            if (DanLieShi != "")//计划单列市
                            {
                                //cwSearch.PATTERN = "F XX (" + DanLieShi + "/CO)";
                                pattern1 = DanLieShi + "/CO";
                            }
                            else
                            {
                                //cwSearch.PATTERN = "F XX ((" + shi + "/DZ)*(" + getJiHuaDanLieShi(sheng) + "/CO))";
                                pattern1 = "(" + shi + "/DZ)*(" + getJiHuaDanLieShi(sheng) + "/CO)";
                            }
                        }

                        if (country == "EN")
                        {
                            string guoJiaEn = keytopvalue.Substring(0, keytopvalue.IndexOf("("));
                            string IPCEn = keytopvalue.Substring(keytopvalue.IndexOf("(") + 1, keytopvalue.IndexOf(")") - keytopvalue.IndexOf("(") - 1);
                            pattern1 = "(" + IPCEn + "/IC)@CO=" + getShiJieCode(guoJiaEn);
                            //cwSearch.PATTERN = "F XX (" + IPCEn + "/IC)@CO=" + getShiJieCode(guoJiaEn) + "";// "F XX (" + S_NAME + "/CO)";
                        }
                        break;
                    case "3"://技术重心
                        keytopvalue = keytopvalue.Replace("(", " ").Replace(")", " ").Replace(".", " ");
                        //cwSearch.PATTERN = "F XX (" + S_NAME + "/IC)";
                        pattern1 = keytopvalue + "/IC"; ;
                        break;
                    case "4"://申请人
                        keytopvalue = keytopvalue.Replace("(", " ").Replace(")", " ").Replace(".", " ");
                        pattern1 = keytopvalue + "/PA";

                        break;
                    case "5"://研发人才
                        keytopvalue = keytopvalue.Replace("(", " ").Replace(")", " ").Replace(".", " ");
                        pattern1 = keytopvalue + "/IN";
                        break;
                    case "6"://质量
                        zhiliang = "";
                        switch (keytopvalue)
                        {
                            case "有效发明公开":
                                zhiliang = "@LX=DI@YX";
                                break;
                            case "有效实用新型授权":
                                zhiliang = "@LX=UM@YX";
                                break;
                            case "有效外观设计授权":
                                zhiliang = "@LX=DP@YX";
                                break;
                            case "有效发明授权":
                                zhiliang = "@LX=AI@YX";
                                break;
                            case "失效发明公开":
                                zhiliang = "@LX=DI@SX";
                                break;
                            case "失效实用新型授权":
                                zhiliang = "@LX=UM@SX";
                                break;
                            case "失效外观设计授权":
                                zhiliang = "@LX=WG@SX";
                                break;
                            case "失效发明授权":
                                zhiliang = "@LX=AI@SX";
                                break;
                        }
                        break;
                    case "7"://寿命
                        break;
                    case "8"://来华
                        break;
                    case "9"://自定义
                        break;
                }
            }
            else
            {
                pattern1 = keytopvalue;
            }

            if ((pattern1 != "") && (pattern!=""))
            {
                cwSearch.PATTERN = "F XX (" + pattern + ")*(" + pattern1 + ")";
            }
            else if (pattern1 != "")
            {
                if (C_TYPE.Substring(1, 1) != "6")
                {
                    cwSearch.PATTERN = "F XX (" + pattern1 + ")";
                }
            }
            else if (pattern != "")
            {
                if(country=="EN")//世界专利
                {
                    cwSearch.PATTERN = "F XX " + pattern;
                }else
                {
                    cwSearch.PATTERN = "F XX (" + pattern + ")";
                }
            }

            if (C_TYPE.Substring(1, 1) == "1" && !string.IsNullOrEmpty(cwSearch.PATTERN))//成果
            {
                cwSearch.PATTERN += "@LX=UM,DP,AI";
            }
            if (C_TYPE.Substring(1, 1) == "6" && !string.IsNullOrEmpty(cwSearch.PATTERN))//质量
            {
                cwSearch.PATTERN += zhiliang;
            }
            else if (C_TYPE.Substring(1, 1) == "6")
            {
                patent = keytopvalue;

                cwSearch.PATTERN = patent;

            }
            using (DataClasses1DataContext db = new DataClasses1DataContext())
            {
                db.Log = Console.Out;
                db.C_W_SECARCH.InsertOnSubmit(cwSearch);
                db.SubmitChanges();
            }
            if (!string.IsNullOrEmpty(cwSearch.PATTERN))
            {
                patent = cwSearch.PATTERN.Replace("F XX", "");
            }

            return patent;
        }
예제 #4
0
 partial void InsertC_W_SECARCH(C_W_SECARCH instance);
예제 #5
0
파일: YJDB.cs 프로젝트: xy19xiaoyu/TG
        public static void InsertYJItem(List<C_W_SECARCH> lst)
        {
            DataClasses1DataContext db = new DataClasses1DataContext();

            C_W_SECARCH tb = new C_W_SECARCH();
            foreach (var item in lst)
            {
                tb = item;
                db.C_W_SECARCH.InsertOnSubmit(tb);
                db.SubmitChanges();

            }
        }