From d40c0bc5756470a1a57793373a9461f7d7ebb9ba Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 25 十月 2024 18:45:57 +0800 Subject: [PATCH] 修改bug --- DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 63 +++++++++++++++++++++++++++---- 1 files changed, 54 insertions(+), 9 deletions(-) diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs index 57aea1e..65f16cd 100644 --- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs +++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs @@ -12,6 +12,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; +using DevExpress.Office.Model; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; using DevExpress.XtraGrid; @@ -281,10 +282,7 @@ txt.ReadOnly = isEdt; txt.SelectedIndex = i; } - - ; } - continue; } @@ -376,7 +374,14 @@ txt.Enabled = !isEdt; continue; } - + if (colType is CheckEdit) + { + var txt = colType as CheckEdit; + if (txt != null) + txt.Checked = bool.Parse(strVal); + txt.ReadOnly = isEdt; + continue; + } //鏃堕棿 if (colType is DateTimePicker) { @@ -392,9 +397,9 @@ var txt = colType as Label; if (_dddddd == "txt_checkStatus") { - if (strVal == "True") + if (strVal == "True" || strVal=="1") txt.Text = "宸插鏍�"; - if (strVal == "False") + if (strVal == "False" || strVal=="0" || strVal=="") txt.Text = "鏈鏍�"; } else @@ -402,6 +407,31 @@ txt.Text = strVal; } } + + //鑷畾涔変粨搴� + if (colType is UcLookCk) + { + var txt = colType as UcLookCk; + txt.SetCode( strVal); + txt.Enabled = !isEdt; + continue; + } + //鑷畾涔変緵搴斿晢 + if (colType is UcLookSupplier) + { + var txt = colType as UcLookSupplier; + txt.SetCode(strVal); + txt.Enabled = !isEdt; + continue; + } + if (colType is SimpleButton) + { + var txt = colType as UcLookCk; + txt.SetCode(strVal); + txt.Enabled = !isEdt; + continue; + } + } } catch (Exception ex) @@ -473,13 +503,18 @@ txt.Enabled = !isEdt; continue; } - //鍗曢�� if (ctrl is CheckBox) { var txt = ctrl as CheckBox; txt.Checked = false; txt.Enabled = !isEdt; + } + if (ctrl is CheckEdit) + { + var txt = ctrl as CheckEdit; + txt.ReadOnly = isEdt; + continue; } } } @@ -532,7 +567,17 @@ } //鍗曢�� - if (ctrl is CheckBox) ctrl.Enabled = !isEdt; + if (ctrl is CheckBox) { + ctrl.Enabled = !isEdt; + continue; + } + + if (ctrl is CheckEdit) + { + var txt = ctrl as CheckEdit; + txt.ReadOnly = isEdt; + continue; + } } } @@ -668,7 +713,7 @@ else { _strGuid = dr["guid"].ToString(); - _strName = dr[2].ToString(); + _strName = dr[1].ToString(); } } -- Gitblit v1.9.3