From 208ca42e1c20afafbe48d66259d553ee81eb48ed Mon Sep 17 00:00:00 2001
From: Shuxia Ning <NingShuxia0927@outlook.com>
Date: 星期三, 13 十一月 2024 11:02:43 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/05-completed/XhsProjectSimulationAnalysisCtrl.cs |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/05-completed/XhsProjectSimulationAnalysisCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/05-completed/XhsProjectSimulationAnalysisCtrl.cs
index 9cf3874..08d9475 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/05-completed/XhsProjectSimulationAnalysisCtrl.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/05-completed/XhsProjectSimulationAnalysisCtrl.cs
@@ -13,6 +13,8 @@
 
         public void SetBindingData(Model.RevitModel revitModel)
         {
+            if (revitModel == null)
+                return;
             _allBindingList = new List<XhsProjectSimulationAnalysisViewModel>();
             this.xhsProjectSimulationAnalysisViewModelBindingSource.DataSource = _allBindingList;
             var allRevitParterList = revitModel.GetAllParters();
@@ -30,19 +32,19 @@
                         {
                             case Revit.ePropStatus.Error:
                                 {
-                                    _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParter.Name, Description = revitParterPropStatus.StatusInfo, ErrorLevel = "Error", PropStatus = "閿欒" });
+                                    _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Id, Name = revitParter.Name, Description = revitParterPropStatus.StatusInfo, ErrorLevel = "Error", PropStatus = "閿欒" });
                                 }
                                 break;
 
                             case Revit.ePropStatus.Lack:
                                 {
-                                    _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParterPropStatus.PropName, Description = revitParterPropStatus.StatusInfo, ErrorLevel = "Lack", PropStatus = "缂虹渷" });
+                                    _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Id, Name = revitParterPropStatus.PropName, Description = revitParterPropStatus.StatusInfo, ErrorLevel = "Lack", PropStatus = "缂虹渷" });
                                 }
                                 break;
 
                             case Revit.ePropStatus.Abnormal:
                                 {
-                                    _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParterPropStatus.PropName, Description = revitParterPropStatus.StatusInfo, ErrorLevel = "Abnormal", PropStatus = "寮傚父" });
+                                    _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Id, Name = revitParterPropStatus.PropName, Description = revitParterPropStatus.StatusInfo, ErrorLevel = "Abnormal", PropStatus = "寮傚父" });
                                 }
                                 break;
 

--
Gitblit v1.9.3