Shuxia Ning
2025-01-08 0a1bf56909464e938a68c29b26ab88ff51380fad
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-flowmeter/AssetsFlowmeterSingleMatchingDlg.cs
@@ -1,16 +1,4 @@
using DevExpress.Mvvm.POCO;
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HStation.WinFrmUI
namespace HStation.WinFrmUI
{
    public partial class AssetsFlowmeterSingleMatchingDlg : DevExpress.XtraEditors.XtraForm
    {
@@ -26,7 +14,7 @@
        private HydroFlowmeterMatchingViewModel _input = null;
        /// <summary>
        ///
        ///
        /// </summary>
        public void SetBindingData(HydroFlowmeterMatchingViewModel input)
        {
@@ -35,7 +23,7 @@
                return;
            }
            _input = input;
            this.assetsFlowmeterSingleMatchingCtrl1.SetBindingData(input.DbId);
            this.assetsFlowmeterSingleMatchingCtrl2.SetBindingData(input.DbId);
        }
        private void GeneralOkAndCancelCtrl1_OkEvent()
@@ -44,18 +32,17 @@
            {
                return;
            }
            var vm = this.assetsFlowmeterSingleMatchingCtrl1.Get();
            var vm = this.assetsFlowmeterSingleMatchingCtrl2.Get();
            if (vm == null)
            {
                return;
            }
            _input.MatchingDbId = vm.ID.ToString();
            _input.MatchingModelType = vm.Name;
            _input.MinorLoss = vm.MinorLoss;
            this.ReloadDataEvent?.Invoke(_input);
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}