From 77a4be9a061af13fcd7a0143cf6299172a6fa7f9 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期四, 05 十二月 2024 11:14:46 +0800
Subject: [PATCH] 项目管理优化

---
 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