|
@@ -31,13 +31,22 @@ namespace SAGA.MBI.Tools
|
|
|
/// <returns></returns>
|
|
|
public static int GetBIMID(this string cbimId)
|
|
|
{
|
|
|
- string bimId = cbimId;
|
|
|
- var strs = cbimId.Split(':');
|
|
|
- if (strs.Length > 1)
|
|
|
- bimId = strs[1];
|
|
|
- return bimId.ToInt();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ string bimId = cbimId;
|
|
|
+ var strs = cbimId.Split(':');
|
|
|
+ if (strs.Length > 1)
|
|
|
+ bimId = strs[1];
|
|
|
+ return bimId.ToInt();
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Console.WriteLine(e);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 仅保留岗位,没有对应模型的bimid
|
|
|
/// 格式为:
|
|
@@ -142,7 +151,7 @@ namespace SAGA.MBI.Tools
|
|
|
/// </summary>
|
|
|
/// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
- public static bool IsSuccessRequest2(this string request,ref string msg)
|
|
|
+ public static bool IsSuccessRequest2(this string request, ref string msg)
|
|
|
{
|
|
|
bool result = false;
|
|
|
if (request.IsNullOrEmpty()) return result;
|