| | |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | public event Action<ValveMatchingViewModel> ReloadDataEvent; |
| | | public event Action<HydroValveMatchingViewModel> ReloadDataEvent; |
| | | |
| | | private ValveMatchingViewModel _ValveMatchingView = null; |
| | | private HydroValveMatchingViewModel _valveMatchingView = null; |
| | | |
| | | public void SetBindingData(ValveMatchingViewModel ValveMatchingViewModel) |
| | | public void SetBindingData(HydroValveMatchingViewModel ValveMatchingViewModel) |
| | | { |
| | | this.xtraUserControl11.SetBindingData(ValveMatchingViewModel); |
| | | _ValveMatchingView = ValveMatchingViewModel; |
| | | _valveMatchingView = ValveMatchingViewModel; |
| | | } |
| | | |
| | | //确定 |
| | | private void btnComplete_Click(object sender, EventArgs e) |
| | | { |
| | | if (_ValveMatchingView.MatchingDbId == null || _ValveMatchingView.MatchingDbId == string.Empty) |
| | | if (_valveMatchingView.MatchingDbId == null || _valveMatchingView.MatchingDbId == string.Empty) |
| | | { |
| | | TipFormHelper.ShowError("阀门型号选择错误"); |
| | | return; |
| | | } |
| | | if (_ValveMatchingView.MatchingValveType == HStation.Assets.eValveType.TCV || _ValveMatchingView.MatchingValveType == HStation.Assets.eValveType.GPV) |
| | | if ((int)_valveMatchingView.MatchingValveType == (int)HStation.Assets.eValveType.TCV || (int)_valveMatchingView.MatchingValveType == (int)HStation.Assets.eValveType.GPV) |
| | | { |
| | | if (_ValveMatchingView.MatchingCurveDbId == null || _ValveMatchingView.MatchingCurveDbId == string.Empty) |
| | | if (_valveMatchingView.MatchingCurveDbId == null || _valveMatchingView.MatchingCurveDbId == string.Empty) |
| | | { |
| | | TipFormHelper.ShowError("曲线选择错误"); |
| | | return; |
| | |
| | | } |
| | | else |
| | | { |
| | | _ValveMatchingView.MatchingCurveOL = null; |
| | | _ValveMatchingView.MatchingCurveQL = null; |
| | | _valveMatchingView.MatchingCurveOL = null; |
| | | _valveMatchingView.MatchingCurveQL = null; |
| | | } |
| | | ReloadDataEvent.Invoke(_ValveMatchingView); |
| | | ReloadDataEvent.Invoke(_valveMatchingView); |
| | | this.Close(); |
| | | } |
| | | } |