duheng
2024-11-06 31e3f4ffdf7d566db391a5fcb94984f23e0abb02
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/01-matching/03-valve/01-valvesinglematching/ValveSingleMatchingDlg.cs
@@ -1,10 +1,11 @@
namespace HStation.WinFrmUI.Xhs
namespace HStation.WinFrmUI
{
    public partial class ValveSingleMatchingDlg : DevExpress.XtraEditors.XtraForm
    {
        public ValveSingleMatchingDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
        }
        public event Action<ValveMatchingViewModel> ReloadDataEvent;
@@ -13,23 +14,23 @@
        public void SetBindingData(ValveMatchingViewModel ValveMatchingViewModel)
        {
            //this.xtraUserControl11.SetBindingData(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.MatchingCurveDbId == null || _ValveMatchingView.MatchingCurveDbId == string.Empty)
              {
                  TipFormHelper.ShowError("曲线选择错误");
                  return;
              }*/
            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);
        }
    }