From ddd9b50f12ac0bd6a4cd0870f3ea06f0ea579520 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 10 十二月 2024 09:35:45 +0800
Subject: [PATCH] 1
---
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 75 ++++++++++++++++++++++++++++++++++---
1 files changed, 68 insertions(+), 7 deletions(-)
diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index a7fb76b..ae93d9e 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -128,7 +128,7 @@
request.Timeout = 15000;
request.AllowAutoRedirect = false;
request.ServicePoint.Expect100Continue = false;
- wdf.SetCaption(_caption+"锛�10/100锛�" + meth);
+ wdf.SetCaption(_caption + "锛�10/100锛�" + meth);
HttpRequestCachePolicy noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore);
request.CachePolicy = noCachePolicy;
wdf.SetCaption(_caption + "锛�20/100锛�" + meth);
@@ -604,7 +604,28 @@
txt.Enabled = false;
continue;
}
-
+ //鑷畾鐢ㄦ埛
+ if (colType is UcLookUser)
+ {
+ var txt = colType as UcLookUser;
+ txt.SetIdOrCode(strVal);
+ if (txt.IsReadly == false)
+ txt.Enabled = !isEdt;
+ else
+ txt.Enabled = false;
+ continue;
+ }
+ //鑷畾鎵撳嵃鏈�
+ if (colType is UcLookPrint)
+ {
+ var txt = colType as UcLookPrint;
+ txt.SetIdOrCode(strVal);
+ if (txt.IsReadly == false)
+ txt.Enabled = !isEdt;
+ else
+ txt.Enabled = false;
+ continue;
+ }
if (colType is SimpleButton)
{
var txt = colType as SimpleButton;
@@ -683,7 +704,12 @@
if (ctrl is TextEdit)
{
var txt = ctrl as TextEdit;
- txt.Text = "";
+ if (txt.Tag != null && txt.Tag.ToString().Length > 0 && txt.Tag.ToString().StartsWith("moren"))
+ {
+ txt.Text = txt.Tag.ToString().Replace("moren.", "");
+ }
+ else
+ txt.Text = "";
txt.ReadOnly = isEdt;
continue;
}
@@ -706,7 +732,7 @@
if (ctrl is CheckBox)
{
var txt = ctrl as CheckBox;
- txt.Checked = false;
+ //txt.Checked = false;
txt.Enabled = !isEdt;
}
if (ctrl is CheckEdit)
@@ -784,6 +810,22 @@
if (ctrl is UcLookOrg)
{
var txt = ctrl as UcLookOrg;
+ txt.SetIdOrCode("-1");
+ txt.Enabled = !isEdt;
+ continue;
+ }
+ //鑷畾鐢ㄦ埛
+ if (ctrl is UcLookUser)
+ {
+ var txt = ctrl as UcLookUser;
+ txt.SetIdOrCode("-1");
+ txt.Enabled = !isEdt;
+ continue;
+ }
+ //鑷畾鎵撳嵃鏈�
+ if (ctrl is UcLookPrint)
+ {
+ var txt = ctrl as UcLookPrint;
txt.SetIdOrCode("-1");
txt.Enabled = !isEdt;
continue;
@@ -959,6 +1001,26 @@
if (ctrl is UcLookOrg)
{
var txt = ctrl as UcLookOrg;
+ if (txt.IsReadly == false)
+ txt.Enabled = !isEdt;
+ else
+ txt.Enabled = false;
+ continue;
+ }
+ //鑷畾鐢ㄦ埛
+ if (ctrl is UcLookUser)
+ {
+ var txt = ctrl as UcLookUser;
+ if (txt.IsReadly == false)
+ txt.Enabled = !isEdt;
+ else
+ txt.Enabled = false;
+ continue;
+ }
+ //鑷畾鎵撳嵃
+ if (ctrl is UcLookPrint)
+ {
+ var txt = ctrl as UcLookPrint;
if (txt.IsReadly == false)
txt.Enabled = !isEdt;
else
@@ -1362,8 +1424,7 @@
/// <param name="icoName">鍥炬爣璺緞</param>
public static void SetGridSear(GridView gridView1, PictureBox btnChkIco = null, Form fm = null, string fileName = "checkStatus", string icoName = "")
{
- // gridView1.OptionsView.ColumnAutoWidth = false;鑷姩璋冩暣鍒楀
-
+ // gridView1.OptionsView.ColumnAutoWidth = false;鑷姩璋冩暣鍒楀
foreach (GridColumn column in gridView1.Columns)
{
column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
@@ -1460,7 +1521,7 @@
return regex.IsMatch(str);
}
-
+
}
--
Gitblit v1.9.3