コード例 #1
0
        /// #################################################################
        /// <summary>
        ///     获取所有发明人名称
        ///     Kevin Wang(2010-10-25)
        /// </summary>
        /// <returns>所有发明人名称</returns>
        public string GetInventorNames(string sSplit)
        {
            string sNames = "";

            IOrderedEnumerable <Inventor> Invertors = from e in Inventors.Cast
                                                      <Inventor>()
                                                      orderby e.n_Sequence
                                                      select e;

            switch (sSplit)
            {
            case "1":
                foreach (Inventor app in Invertors)
                {
                    sNames += app.s_Name + ";";
                }
                sNames = sNames.TrimEnd(new[] { ';' });
                break;

            case "2":
                foreach (Inventor app in Invertors)
                {
                    sNames += app.s_Name + "    ";
                }
                sNames = sNames.Trim();
                break;

            case "3":
                foreach (Inventor app in Invertors)
                {
                    sNames += app.s_Name + "、";
                }
                sNames = sNames.TrimEnd(new[] { '、' });
                break;

            case "4":
                foreach (Inventor app in Invertors)
                {
                    sNames += app.s_Name + ";";
                }
                sNames = sNames.TrimEnd(new[] { ';' });
                break;

            case "5":
                int iCount = 1;
                sNames = " ";
                foreach (Inventor app in Invertors)
                {
                    sNames += " " + iCount + "." + app.s_Name;
                }
                break;
            }
            return(sNames);
        }
コード例 #2
0
        /// #################################################################
        /// <summary>
        ///     获取所有发明人其他名称
        ///     Kevin Wang(2010-10-25)
        /// </summary>
        /// <returns>所有发明人其他名称</returns>
        public string GetInventorOtherNames()
        {
            string sNames = "";

            //2013-01-29 lixin for bug 26607
            IOrderedEnumerable <Inventor> Invertors = from e in Inventors.Cast
                                                      <Inventor>()
                                                      orderby e.n_Sequence
                                                      select e;

            foreach (Inventor app in Invertors)
            {
                sNames += app.s_NativeName + ";";
            }

            //foreach (Inventor person in this.Inventors)
            //{
            //    sNames += person.s_NativeName + ";";
            //}
            sNames = sNames.TrimEnd(new[] { ';' }); //去掉最后一个分号
            return(sNames);
        }