duheng
2024-12-04 7079cbb505471a8d3251cac4e27c7a3841f8e656
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 ExchangerSingleMatchingDlg : DevExpress.XtraEditors.XtraForm
    {
        public ExchangerSingleMatchingDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
        }
 
        public event Action<HydroExchangerMatchingViewModel> ReloadDataEvent;
 
        private HydroExchangerMatchingViewModel _ExchangerMatchingView = null;
 
        public void SetBindingData(HydroExchangerMatchingViewModel ExchangerMatchingViewModel)
        {
            this.xtraUserControl11.SetBindingData(ExchangerMatchingViewModel);
            _ExchangerMatchingView = ExchangerMatchingViewModel;
        }
 
        //确定
        private void btnComplete_Click(object sender, EventArgs e)
        {
            if (_ExchangerMatchingView.MatchingDbId == null || _ExchangerMatchingView.MatchingDbId == string.Empty)
            {
                TipFormHelper.ShowError("阀门型号选择错误");
                return;
            }
 
            if (_ExchangerMatchingView.MatchingCurveDbId == null || _ExchangerMatchingView.MatchingCurveDbId == string.Empty)
            {
                TipFormHelper.ShowError("曲线选择错误");
                return;
            }
            else
            {
                _ExchangerMatchingView.MatchingCurveQL = null;
            }
            ReloadDataEvent.Invoke(_ExchangerMatchingView);
            this.Close();
        }
    }
}