lixiaojun
2024-12-19 1dd158434a41627a6684cd630b2696fb83b1e3d6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
namespace HStation.WinFrmUI
{
    public partial class SimulationTankSingleMatchingDlg : DevExpress.XtraEditors.XtraForm
    {
        public SimulationTankSingleMatchingDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
        }
 
        public event Action<HydroTankMatchingViewModel> ReloadDataEvent;
 
        private HydroTankMatchingViewModel _TankMatchingView = null;
 
        public void SetBindingData(HydroTankMatchingViewModel TankMatchingViewModel)
        {
            this.xtraUserControl11.SetBindingData(TankMatchingViewModel);
            _TankMatchingView = TankMatchingViewModel;
        }
 
        //确定
        private void btnComplete_Click(object sender, EventArgs e)
        {
            if (_TankMatchingView.MatchingDbId == null || _TankMatchingView.MatchingDbId == string.Empty)
            {
                TipFormHelper.ShowError("水池型号选择错误");
                return;
            }
 
            if (_TankMatchingView.MatchingCurveDbId == null || _TankMatchingView.MatchingCurveDbId == string.Empty)
            {
                TipFormHelper.ShowError("曲线选择错误");
                return;
            }
            else
            {
                _TankMatchingView.MatchingVolCurve = null;
            }
            ReloadDataEvent.Invoke(_TankMatchingView);
            this.Close();
        }
    }
}