From 651d1f87d2e0e26021c20f3667e1db7b1349b478 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期一, 23 九月 2024 10:27:44 +0800 Subject: [PATCH] 冲突缺少文件补充 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/02-ProjectInfo/InputXhsProjectInfoWizardPage.cs | 45 +++++++++++++++++++++++++++++++++++++-------- 1 files changed, 37 insertions(+), 8 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/02-ProjectInfo/InputXhsProjectInfoWizardPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/02-ProjectInfo/InputXhsProjectInfoWizardPage.cs index 529ca1f..fb47f8d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/02-ProjectInfo/InputXhsProjectInfoWizardPage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/02-ProjectInfo/InputXhsProjectInfoWizardPage.cs @@ -1,4 +1,6 @@ -锘縩amespace HStation.WinFrmUI +锘縰sing DevExpress.XtraBars.Customization; + +namespace HStation.WinFrmUI { public partial class InputXhsProjectInfoWizardPage : DevExpress.XtraEditors.XtraUserControl, Yw.WinFrmUI.IWizardPage<ImportXhsProjectViewModel> { @@ -15,7 +17,10 @@ private ImportXhsProjectViewModel _vm = null;//鎿嶄綔瀵硅薄 private bool _isInitialize = false;//鏄惁鍒濆鍖� private Lazy<HStation.BLL.XhsProject> _bllProject = new(() => new HStation.BLL.XhsProject());//椤圭洰bll - private Lazy<Yw.BLL.SysFlagStd> _bllFlag = new(() => new Yw.BLL.SysFlagStd());//鏍囩bll + private Lazy<Yw.BLL.SysFlag> _bllFlag = new(() => new Yw.BLL.SysFlag());//鏍囩bll + public static Action AutoAddItem; + public static Action DeleteItem; + public static bool AllowImport = false; /// <summary> /// 鍒濆鍖� @@ -27,9 +32,11 @@ return; } _vm = t; - var allFlagList = await _bllFlag.Value.GetFlagListBySysType(HStation.Xhs.DataType.XhsProject); - this.setFlagsEditCtrl1.SetBindingData(allFlagList, null); _isInitialize = true; + var allFlagList = await _bllFlag.Value.GetBySysType(HStation.Xhs.DataType.XhsProject); + if (allFlagList == null) + return; + this.setFlagsEditCtrl1.SetBindingData(allFlagList.Select(x => x.Name).ToList(), null); } /// <summary> @@ -39,7 +46,7 @@ { get { - return true; + return false; } } @@ -50,6 +57,17 @@ { get { + _vm.ZipFile = this.btnEditSelectModelFile.Text.Trim(); + /* if (_vm.ZipFile != string.Empty) + { + AllowImport = true; + AutoAddItem.Invoke(); + } + else + { + AllowImport = false; + DeleteItem.Invoke(); + }*/ return _isInitialize; } } @@ -102,10 +120,9 @@ return false; } } - _vm.NO = this.txtNO.Text.Trim(); _vm.Name = this.txtName.Text.Trim(); _vm.Customer = this.txtCustomer.Text.Trim(); - _vm.Address = this.txtAddress.Text.Trim(); + // _vm.Address = this.txtAddress.Text.Trim(); _vm.Flags = null; _vm.TagName = tagName; _vm.Description = this.txtDescription.Text.Trim(); @@ -128,5 +145,17 @@ return false; } + private void btnEditSelectModelFile_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) + { + var suffix = Settings.XhsParasHelper.Xhs.File.Suffix; + var dlg = new OpenFileDialog(); + dlg.Filter = $"妯″瀷鏂囦欢(*{suffix})|*{suffix}"; + dlg.FilterIndex = 1; + if (dlg.ShowDialog() == DialogResult.OK) + { + var fileName = dlg.FileName; + this.btnEditSelectModelFile.EditValue = fileName; + } + } } -} +} \ No newline at end of file -- Gitblit v1.9.3