lixiaojun
2024-12-19 e37b6f2ca026097b83da3ec989cb0d454cceddad
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 SimulationCompressorSingleMatchingDlg : DevExpress.XtraEditors.XtraForm
    {
        public SimulationCompressorSingleMatchingDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
        }
 
        public event Action<HydroCompressorMatchingViewModel> ReloadDataEvent;
 
        private HydroCompressorMatchingViewModel _CompressorMatchingView = null;
 
        public void SetBindingData(HydroCompressorMatchingViewModel CompressorMatchingViewModel)
        {
            this.xtraUserControl11.SetBindingData(CompressorMatchingViewModel);
            _CompressorMatchingView = CompressorMatchingViewModel;
        }
 
        //确定
        private void btnComplete_Click(object sender, EventArgs e)
        {
            if (_CompressorMatchingView.MatchingDbId == null || _CompressorMatchingView.MatchingDbId == string.Empty)
            {
                TipFormHelper.ShowError("水池型号选择错误");
                return;
            }
 
            if (_CompressorMatchingView.MatchingCurveDbId == null || _CompressorMatchingView.MatchingCurveDbId == string.Empty)
            {
                TipFormHelper.ShowError("曲线选择错误");
                return;
            }
            else
            {
                _CompressorMatchingView.MatchingCurveQL = null;
            }
            ReloadDataEvent.Invoke(_CompressorMatchingView);
            this.Close();
        }
    }
}