From e6db49c7ec2e2be934c625c48d665fdca04ffaf5 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 02 一月 2025 16:49:36 +0800
Subject: [PATCH] 超领取
---
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 37 ++++++++++++++++++++++---------------
1 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 37332df..b33f18b 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -275,13 +275,21 @@
foreach (GridColumn colmn in gv.Columns)
{
colmn.OptionsColumn.AllowEdit = true;
+
+ if (colmn.Name.ToString().Contains("gvBtnAlawys") )
+ {
+ colmn.Visible = true;
+ colmn.OptionsColumn.ReadOnly = false;
+ };
+
if (colmn.Name.ToString().Contains("gvMxDel") || colmn.Name.ToString().Contains("gvMxTui"))
{
colmn.Visible = !isEdt;
}
else
{
- if (isEdt == false) {
+ if (isEdt == false)
+ {
if (colmn.Tag != null && colmn.Tag.ToString().EndsWith("edit"))
colmn.OptionsColumn.ReadOnly = isEdt;
else
@@ -344,25 +352,22 @@
var txt = colType as ComboBoxEdit;
if (txt.Properties.TextEditStyle ==
TextEditStyles.DisableTextEditor)
- txt.SelectedIndex = int.Parse(strVal);
+ try
+ {
+ txt.SelectedIndex = int.Parse(strVal);
+ }
+ catch (Exception)
+ {
+
+ txt.Text = strVal;
+ }
+
else
txt.Text = strVal;
txt.ReadOnly = isEdt;
continue;
}
- //涓嬫媺
- if (colType is ComboBoxEdit)
- {
- var txt = colType as ComboBoxEdit;
- if (txt.Properties.TextEditStyle ==
- TextEditStyles.DisableTextEditor)
- txt.SelectedIndex = int.Parse(strVal);
- else
- txt.Text = strVal;
- txt.ReadOnly = isEdt;
- continue;
- }
//鑷畾涔変笅鎷�
if (colType is UcComBox)
@@ -751,11 +756,13 @@
{
var txt = ctrl as CheckBox;
txt.Enabled = !isEdt;
+ txt.Checked = false;
}
if (ctrl is CheckEdit)
{
var txt = ctrl as CheckEdit;
txt.ReadOnly = isEdt;
+ txt.Checked = false;
continue;
}
@@ -912,7 +919,7 @@
}
else
{
- if (colmn.Tag!=null && colmn.Tag.ToString().EndsWith("edit"))
+ if (colmn.Tag != null && colmn.Tag.ToString().EndsWith("edit"))
colmn.OptionsColumn.ReadOnly = isEdt;
else
colmn.OptionsColumn.ReadOnly = isEdt;
--
Gitblit v1.9.3