From facdda630bc2a16c2a61e5db6e4387e257202d44 Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期三, 15 一月 2025 11:40:38 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/HStation.WinFrmUI.Auth.Core/00-Control/MenuInfoCtrl.cs | 94 ++++++++++++++++++++-------------------------- 1 files changed, 41 insertions(+), 53 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Auth.Core/00-Control/MenuInfoCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Auth.Core/00-Control/MenuInfoCtrl.cs index 38ec7cb..3ea52b8 100644 --- a/WinFrmUI/HStation.WinFrmUI.Auth.Core/00-Control/MenuInfoCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Auth.Core/00-Control/MenuInfoCtrl.cs @@ -1,17 +1,4 @@ -锘縰sing DevExpress.XtraLayout; -using Furion.DataValidation; -using NetTaste; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace HStation.WinFrmUI.Auth +锘縩amespace HStation.WinFrmUI.Auth { public partial class MenuInfoCtrl : UserControl { @@ -19,43 +6,44 @@ { InitializeComponent(); } - Yw.BLL.ProjectMenu _sever = new Yw.BLL.ProjectMenu(); - string error; - Yw.Vmo.ProjectMenu _Menu; - long pjid = 0; + + private Yw.BLL.ProjectMenu _sever = new Yw.BLL.ProjectMenu(); + private string error; + private Yw.Vmo.ProjectMenu _Menu; + private long pjid = 0; + public async void SetimageComboBoxEditParentName() { - List<Yw.Dto.ProjectMenuDto> AllMenu = await _sever.GetByProjectID(pjid); - if (imageComboBoxEditType.SelectedIndex == 1) - { - imageComboBoxEditParentName.Properties.Items.Clear(); - imageComboBoxEditParentName.Properties.Items.Add("鏃�", 0, -1); - foreach (var item in AllMenu) - { - if(item.Type == 0) - { - imageComboBoxEditParentName.EditValue = null; - imageComboBoxEditParentName.Properties.Items.Add(item.Name, item.ID, -1); - } - - } - imageComboBoxEditParentName.SelectedIndex = 0; - } - else - { - imageComboBoxEditParentName.Properties.Items.Clear(); - foreach (var item in AllMenu) - { - if (item.Type == 1) - { - imageComboBoxEditParentName.EditValue = null; - imageComboBoxEditParentName.Properties.Items.Add(item.Name, item.ID, -1); - } - } - imageComboBoxEditParentName.SelectedIndex = 0; - } - + /* List<Yw.Dto.ProjectMenuDto> AllMenu = await _sever.GetByProjectID(pjid); + if (imageComboBoxEditType.SelectedIndex == 1) + { + imageComboBoxEditParentName.Properties.Items.Clear(); + imageComboBoxEditParentName.Properties.Items.Add("鏃�", 0, -1); + foreach (var item in AllMenu) + { + if (item.Type == 0) + { + imageComboBoxEditParentName.EditValue = null; + imageComboBoxEditParentName.Properties.Items.Add(item.Name, item.ID, -1); + } + } + imageComboBoxEditParentName.SelectedIndex = 0; + } + else + { + imageComboBoxEditParentName.Properties.Items.Clear(); + foreach (var item in AllMenu) + { + if (item.Type == 1) + { + imageComboBoxEditParentName.EditValue = null; + imageComboBoxEditParentName.Properties.Items.Add(item.Name, item.ID, -1); + } + } + imageComboBoxEditParentName.SelectedIndex = 0; + }*/ } + public async Task<string> SetProjectMenu(Yw.Vmo.ProjectMenu projectMenu) { error = ""; @@ -91,7 +79,7 @@ radioGroupWeight.SelectedIndex = 2; } textEditDescription.Text = this._Menu.Description; - var _AllMenu =await _sever.GetByProjectID(pjid); + var _AllMenu = await _sever.GetByProjectID(pjid); textEditName.Text = this._Menu.Name; foreach (var item in _AllMenu) { @@ -101,7 +89,7 @@ break; } } - + return error; } @@ -141,6 +129,7 @@ return menu; } + public Yw.Vmo.ProjectMenu OperateData(Yw.Vmo.ProjectMenu projectMenu, out string error) { error = ""; @@ -157,7 +146,7 @@ else { this._Menu = GetProjectMenu(this._Menu, out error); - + if (!string.IsNullOrEmpty(error)) { return null; @@ -169,7 +158,6 @@ } return this._Menu; } - } private void imageComboBoxEditType_SelectedIndexChanged(object sender, EventArgs e) @@ -187,4 +175,4 @@ } } } -} +} \ No newline at end of file -- Gitblit v1.9.3