duheng
2024-10-24 4812786898dc040fc236e9e00e21b9f4d08f57e3
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
namespace HStation.WinFrmUI
{
    public partial class ValveSingleMatchingDlg : DevExpress.XtraEditors.XtraForm
    {
        public ValveSingleMatchingDlg()
        {
            InitializeComponent();
        }
 
        public event Action<ValveMatchingViewModel> ReloadDataEvent;
 
        private ValveMatchingViewModel _ValveMatchingView = null;
 
        public void SetBindingData(ValveMatchingViewModel ValveMatchingViewModel)
        {
            this.xtraUserControl11.SetBindingData(ValveMatchingViewModel);
            _ValveMatchingView = ValveMatchingViewModel;
        }
 
        //确定
        private void btnComplete_Click(object sender, EventArgs e)
        {
            if (_ValveMatchingView.MatchingDbId == null || _ValveMatchingView.MatchingDbId == string.Empty)
            {
                TipFormHelper.ShowError("阀门型号选择错误");
                return;
            }
            if (_ValveMatchingView.MatchingChartDbId == null || _ValveMatchingView.MatchingChartDbId == string.Empty)
            {
                TipFormHelper.ShowError("曲线选择错误");
                return;
            }
            ReloadDataEvent.Invoke(_ValveMatchingView);
        }
    }
}