From c2b56fc9401718620dd2a280557b8c716e4ad05a Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期一, 23 十二月 2024 17:49:41 +0800 Subject: [PATCH] 整体优化 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs index d1e91f6..c7eec7e 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs @@ -1,4 +1,6 @@ -锘縩amespace HStation.WinFrmUI +锘縰sing DevExpress.Utils.Svg; + +namespace HStation.WinFrmUI { public partial class CreateXhsSchemeInfoPage : DevExpress.XtraEditors.XtraUserControl, Yw.WinFrmUI.IWizardPage<CreateXhsSchemeViewModel> { @@ -26,6 +28,7 @@ /// </summary> public async void InitialPage(CreateXhsSchemeViewModel t) { + if (_isInitialize) { return; @@ -57,7 +60,9 @@ t.Scheme = new XhsSchemeVmo(); if (t.AllSchemeList != null && t.AllSchemeList.Count > 0) { - t.Scheme.SortCode = t.AllSchemeList.Max(x => x.SortCode) + 1; + var sort_code= t.AllSchemeList.Max(x => x.SortCode) + 1; + t.Scheme.SortCode = sort_code; + this.txtName.EditValue = $"鏂规{sort_code}"; } } } @@ -77,6 +82,7 @@ } _vm.Scheme.Name = this.txtName.Text.Trim(); _vm.Scheme.NO = this.txtNO.Text.Trim(); + _vm.Scheme.SiteID = _vm.ProjectSite.ID; _vm.Scheme.Flags = this.setFlagsEditCtrl1.SelectedFlagList; _vm.Scheme.AllowCustom = this.ckAllowCustom.Checked; _vm.Scheme.ChangeTypes = this.xhsSchemeChangeTypeCheckedListHorizCtrl1.GetCheckedList(); @@ -144,7 +150,11 @@ /// 鑳藉惁涓嬩竴姝� /// </summary> public bool CanNext() - { + { + if (!_isInitialize) + { + return false; + } return Save(); } @@ -161,7 +171,14 @@ /// </summary> public bool CanComplete() { - return Save(); + if (!_isInitialize) + { + return false; + } + if (!Save()) + return false; + var bol = Task.Run(async () => await CreateXhsSchemeHelper.Create(_vm)).Result; + return bol; } -- Gitblit v1.9.3