From b0cebba8ea5393c5de74f4b09078f7a4d3d3e8cf Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 13 十二月 2024 10:38:09 +0800 Subject: [PATCH] Merge branch 'master' of http://43.142.96.171:8080/r/~tjx/GsMesClient --- DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 102 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 97 insertions(+), 5 deletions(-) diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs index f2a6900..dd32cf5 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,39 @@ 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 UcLookDefectType) + { + var txt = colType as UcLookDefectType; + 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 +715,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 +743,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 +821,30 @@ 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; + } + //鑷畾缂洪櫡绫诲埆 + if (ctrl is UcLookDefectType) + { + var txt = ctrl as UcLookDefectType; txt.SetIdOrCode("-1"); txt.Enabled = !isEdt; continue; @@ -959,6 +1020,36 @@ 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 + txt.Enabled = false; + continue; + } + //鑷畾缂洪櫡绫诲埆 + if (ctrl is UcLookDefectType) + { + var txt = ctrl as UcLookDefectType; if (txt.IsReadly == false) txt.Enabled = !isEdt; else @@ -1362,6 +1453,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;鑷姩璋冩暣鍒楀 foreach (GridColumn column in gridView1.Columns) { column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains; @@ -1458,7 +1550,7 @@ return regex.IsMatch(str); } - + } -- Gitblit v1.9.3