Shuxia Ning
2024-12-17 907a1579fecf2c160852cf99b3ea77c08eb481cc
WinFrmUI/HStation.WinFrmUI.Assets.Core/22-cooling/03-factor/AddAssetsCoolingFactorDlg.cs
@@ -1,4 +1,5 @@
using DevExpress.XtraEditors;
using HStation.Vmo;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -22,6 +23,8 @@
            this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent;
        }
        private static AssetsCoolingFactorVmo _last = null;
        /// <summary>
        /// 返回数据事件
        /// </summary>
@@ -35,6 +38,15 @@
        public void SetBindingData()
        {
            _vmo = new Vmo.AssetsCoolingFactorVmo();
            if (_last != null)
            {
                this.txtName.EditValue = _last.Name;
                this.txtMaterial.EditValue = _last.Material;
                this.txtCaliber.EditValue = _last.Caliber;
                this.txtCoefficient.EditValue = _last.Coefficient;
                this.txtLowerLimit.EditValue = _last.LowerLimit;
                this.txtDescription.EditValue = _last.Description;
            }
        }
        //验证
@@ -88,6 +100,7 @@
                return;
            }
            var vmo = await BLLFactory<HStation.BLL.AssetsCoolingFactor>.Instance.GetByID(id);
            _last = vmo;
            this.ReloadDataEvent?.Invoke(vmo);
            this.DialogResult = DialogResult.OK;
            this.Close();