|
@@ -0,0 +1,50 @@
|
|
|
+/* ==============================================================================
|
|
|
+ * 功能描述:MBIElementUtils
|
|
|
+ * 创 建 者:Garrett
|
|
|
+ * 创建日期:2019/6/25 10:18:52
|
|
|
+ * ==============================================================================*/
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Linq;
|
|
|
+using System.Text;
|
|
|
+using System.Threading.Tasks;
|
|
|
+using SAGA.DotNetUtils;
|
|
|
+
|
|
|
+namespace SAGA.MBI.Common
|
|
|
+{
|
|
|
+ /// <summary>
|
|
|
+ /// MBIElementUtils
|
|
|
+ /// </summary>
|
|
|
+ class MBIElementUtils
|
|
|
+ {
|
|
|
+ /// <summary>
|
|
|
+ /// 组合形成CADID
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="code"></param>
|
|
|
+ /// <param name="name"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static string GetCADID(string code, string name)
|
|
|
+ {
|
|
|
+ string result = "";
|
|
|
+ if (code.IsNotNullEmpty())
|
|
|
+ {
|
|
|
+ if (name.IsNotNullEmpty())
|
|
|
+ {
|
|
|
+ result = code + ":" + name;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ result = code;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (name.IsNotNullEmpty())
|
|
|
+ {
|
|
|
+ result = name;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|