From e411302bca8857e102443a5250c82b9580ef07a3 Mon Sep 17 00:00:00 2001 From: duheng <2286773002@qq.com> Date: 星期五, 28 三月 2025 10:49:48 +0800 Subject: [PATCH] 修改成套设备增加逻辑 --- WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/BuildPlaceInfoCtrl.cs | 21 ++++++++------------- 1 files changed, 8 insertions(+), 13 deletions(-) diff --git a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/BuildPlaceInfoCtrl.cs b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/BuildPlaceInfoCtrl.cs index b9b9c28..71bdad5 100644 --- a/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/BuildPlaceInfoCtrl.cs +++ b/WinFrmUI/PBS.WinFrmUI.Hydro/02-quick-modeling/02-place/info/BuildPlaceInfoCtrl.cs @@ -7,8 +7,7 @@ InitializeComponent(); } - - private PlaceBuildParasInfoVmo _model = null; + private PlaceBuildParasInfoVmo _model = null; public void Set(string info) { @@ -26,8 +25,8 @@ } public bool Verify() - { - this.dxErrorProvider1.ClearErrors(); + { + this.dxErrorProvider1.ClearErrors(); return true; } @@ -39,8 +38,9 @@ } _model.CompletionTime = txtCompletionTime.Text; - _model.Developer = txtDeveloper.Text; - _model.PropertyType = cbPropertyType.SelectedIndex; + _model.Developer = txtDeveloper.Text; + if (cbPropertyType.EditValue != null) + _model.PropertyType = (ePropertyType)cbPropertyType.EditValue; if (string.IsNullOrEmpty(this.txtAreaSquare.Text) || !double.TryParse(this.txtAreaSquare.Text, out double areaSquare)) { @@ -53,7 +53,7 @@ if (string.IsNullOrEmpty(this.textGreeningRate.Text) || !double.TryParse(this.textGreeningRate.Text, out double greeningRate)) { - _model.GreeningRate = null; + _model.GreeningRate = null; } else { @@ -62,13 +62,12 @@ if (string.IsNullOrEmpty(this.txtPlotRatio.Text) || !double.TryParse(this.txtPlotRatio.Text, out double plotRatio)) { - _model.PlotRatio = null; + _model.PlotRatio = null; } else { _model.PlotRatio = plotRatio; } - if (string.IsNullOrEmpty(this.txtProperTyYears.Text) || !int.TryParse(this.txtProperTyYears.Text, out int properTyYears)) { @@ -90,9 +89,5 @@ return _model.ToJson(); } - - - - } } \ No newline at end of file -- Gitblit v1.9.3