From 1c3e5bc50d3045d51cb9a9f747d53442b82d9e2c Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 27 十二月 2024 17:50:22 +0800 Subject: [PATCH] 资产修改 --- WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/03-factor/AddAssetsThreelinkFactorDlg.cs | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/03-factor/AddAssetsThreelinkFactorDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/03-factor/AddAssetsThreelinkFactorDlg.cs index 0e030bd..95c707a 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/03-factor/AddAssetsThreelinkFactorDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/03-factor/AddAssetsThreelinkFactorDlg.cs @@ -41,7 +41,8 @@ if (_last != null) { this.txtName.EditValue = _last.Name; - this.txtMinorLoss.EditValue = _last.MinorLoss; + this.textEditBranchThroughCoefficient.EditValue = _last.BranchThroughMinorLoss; + this.textEditRunThroughCoefficient.EditValue = _last.RunThroughMinorLoss; this.txtDescription.EditValue = _last.Description; } } @@ -55,9 +56,14 @@ this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); return false; } - if (string.IsNullOrEmpty(this.txtMinorLoss.Text.Trim())) + if (string.IsNullOrEmpty(this.textEditRunThroughCoefficient.Text.Trim())) { - this.dxErrorProvider1.SetError(this.txtMinorLoss, "蹇呭~椤�"); + this.dxErrorProvider1.SetError(this.textEditRunThroughCoefficient, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.textEditBranchThroughCoefficient.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.textEditBranchThroughCoefficient, "蹇呭~椤�"); return false; } return true; @@ -75,7 +81,8 @@ return; } _vmo.Name = this.txtName.Text.Trim(); - _vmo.MinorLoss = double.Parse(this.txtMinorLoss.EditValue?.ToString()); + _vmo.RunThroughMinorLoss = double.Parse(this.textEditRunThroughCoefficient.EditValue?.ToString()); + _vmo.BranchThroughMinorLoss = double.Parse(this.textEditBranchThroughCoefficient.EditValue?.ToString()); _vmo.Description = this.txtDescription.Text.Trim(); var id = await BLLFactory<HStation.BLL.AssetsThreelinkFactor>.Instance.Insert(_vmo); if (id < 1) -- Gitblit v1.9.3