From 331e49f5a9718cd15baa412a3ca9bb0b70a469c7 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期六, 26 十月 2024 18:33:24 +0800
Subject: [PATCH] 检验基准维护

---
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs |   67 +++++++++++++++++++++++++++++----
 1 files changed, 58 insertions(+), 9 deletions(-)

diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 57aea1e..5685fb1 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;
@@ -251,6 +252,13 @@
             if (gridViews != null)
                 foreach (var gv in gridViews)
                     gv.OptionsBehavior.Editable = !isEdt;
+
+           var _btnAry=  controls.Find("btnSelect", false);
+            if (_btnAry.Length > 0) {
+                var _btnType = _btnAry[0];
+                _btnType.Enabled = !isEdt;
+            }
+
             foreach (JProperty property in dynamicObject.Properties())
             {
                 var strName = property.Name;
@@ -281,10 +289,7 @@
                                     txt.ReadOnly = isEdt;
                                     txt.SelectedIndex = i;
                                 }
-
-                                ;
                             }
-
                             continue;
                         }
 
@@ -376,7 +381,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,15 +404,37 @@
                             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
                             {
                                 txt.Text = strVal;
                             }
+                        }
+                        //鑷畾涔変粨搴�
+                        if (colType is UcLookCk)
+                        {
+                            var txt = colType as UcLookCk;
+                            txt.SetIdOrCode( strVal);
+                            txt.Enabled = !isEdt;
+                            continue;
+                        }
+                        //鑷畾涔変緵搴斿晢
+                        if (colType is UcLookSupplier)
+                        {
+                            var txt = colType as UcLookSupplier;
+                            txt.SetIdOrCode(strVal);
+                            txt.Enabled = !isEdt;
+                            continue;
+                        }
+                        if (colType is SimpleButton)
+                        {
+                            var txt = colType as UcLookCk;
+                            txt.Enabled = !isEdt;
+                            continue;
                         }
                     }
                 }
@@ -473,13 +507,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 +571,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 +717,7 @@
                 else
                 {
                     _strGuid = dr["guid"].ToString();
-                    _strName = dr[2].ToString();
+                      _strName = dr[1].ToString();
                 }
             }
 

--
Gitblit v1.9.3