From c4049242a1cc73da8210f381db72d1a807bd08d4 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期五, 13 十二月 2024 16:33:32 +0800
Subject: [PATCH] 冷却塔管理

---
 WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/02-main/AddAssetsCoolingMainDlg.cs |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/02-main/AddAssetsCoolingMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/02-main/AddAssetsCoolingMainDlg.cs
index acf86c4..e9336a8 100644
--- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/02-main/AddAssetsCoolingMainDlg.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/02-main/AddAssetsCoolingMainDlg.cs
@@ -1,4 +1,7 @@
 锘縰sing DevExpress.XtraEditors;
+using DevExpress.XtraScheduler.Outlook.Interop;
+using HStation.Service.Assets;
+using HStation.Vmo;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -22,6 +25,8 @@
             this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent;
         }
 
+        private static AssetsCoolingMainVmo _last = null;
+
         /// <summary>
         /// 杩斿洖鏁版嵁浜嬩欢
         /// </summary>
@@ -44,6 +49,18 @@
             _vmo.SeriesID = series.ID;
             var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.CoolingMain);
             this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), null);
+            if (_last != null)
+            {
+                this.txtName.EditValue = _last.Name;
+                this.txtMaterial.EditValue = _last.Material;
+                this.txtKeyWord.EditValue = KeyWordHelper.ToString(_last.KeyWords);
+                this.txtCaliber.EditValue = _last.Caliber;
+                this.txtCoefficient.EditValue = _last.Coefficient;
+                this.txtLowerLimit.EditValue = _last.LowerLimit;
+                this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), _last.Flags);
+                this.txtTagName.EditValue = _last.TagName;
+                this.txtDescription.EditValue = _last.Description;
+            }
         }
 
         //楠岃瘉
@@ -114,6 +131,7 @@
                 return;
             }
             var vmo = await BLLFactory<HStation.BLL.AssetsCoolingMain>.Instance.GetByID(id);
+            _last = vmo;
             this.ReloadDataEvent?.Invoke(vmo);
             this.DialogResult = DialogResult.OK;
             this.Close();

--
Gitblit v1.9.3