From 51c3a5b6f8eead206b00679c274bea06e168dbd2 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期三, 17 十二月 2025 16:25:38 +0800
Subject: [PATCH] 加上最新版本

---
 DevApp/Gs.DevApp/UserControl/UcDictionaryComBox.cs |   43 +++++++++++++++++++++++++++++++++++++------
 1 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/UcDictionaryComBox.cs b/DevApp/Gs.DevApp/UserControl/UcDictionaryComBox.cs
index 485355e..d8cf277 100644
--- a/DevApp/Gs.DevApp/UserControl/UcDictionaryComBox.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcDictionaryComBox.cs
@@ -17,9 +17,25 @@
 {
     public partial class UcDictionaryComBox : DevExpress.XtraEditors.XtraUserControl
     {
+
+        /// <summary>
+        /// 涓嬫媺鏀瑰彉浜嬩欢
+        /// </summary>
+        public event EventHandler ChangedEvent;
+
         public UcDictionaryComBox()
         {
             InitializeComponent();
+            this.Load += (ss, ee) => {
+                this.txt_qt003.SelectedIndexChanged += Txt_qt003_SelectedIndexChanged;
+            };
+      
+        }
+
+        private void Txt_qt003_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (ChangedEvent != null)
+                ChangedEvent(this, e);
         }
 
         /// <summary>
@@ -33,6 +49,19 @@
                 this.txt_qt003.Text = value;
             }
         }
+        /// <summary>
+        /// 鏂囨湰妗嗙殑娆″簭 2025-12-12 鍔犱笂
+        /// </summary>
+        public int SelectedIndex
+        {
+            get { return txt_qt003.SelectedIndex; }
+            set
+            {
+                this.txt_qt003.SelectedIndex = value;
+            }
+        }
+
+
 
         /// <summary>
         /// 鏌ヨ鏉′欢
@@ -45,12 +74,13 @@
             set
             {
                 this._WhereTxt = value;
-                if (!string.IsNullOrEmpty(value)) {
+                if (!string.IsNullOrEmpty(value))
+                {
                     getSuppler(value);
                 }
             }
         }
- 
+
         public bool IsReadly
         {
             set
@@ -69,17 +99,18 @@
         {
             txt_qt003.Properties.Items.Clear();
             string _where = " and 1=1 and " + strWhere;
-            var pgq = new PageQueryModel(1, 999999, "a.defect_name", "asc", "", _where);
+            var pgq = new PageQueryModel(1, 999999, "a.defect_code", "asc", "", _where);
             var json = JsonConvert.SerializeObject(pgq);
             try
             {
-                var strReturn =
-                    UtilityHelper.HttpPost("", "MesDefectCodeManager/GetListPage", json);
+                var strReturn = UtilityHelper.HttpPost("", "MesDefectCodeManager/GetListPage", json);
                 var dd = UtilityHelper.ReturnToTablePage(strReturn);
                 var dt = dd.rtnData.list;
-                foreach (DataRow row in dt.Rows) {
+                foreach (DataRow row in dt.Rows)
+                {
                     txt_qt003.Properties.Items.Add(row["defectName"].ToString());
                 }
+                txt_qt003.SelectedIndex = 0;
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3