From 0ce70b79695fc16f33a9f55bce857e38fa12a2ab Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 08 十一月 2024 17:23:24 +0800
Subject: [PATCH] iqc

---
 DevApp/Gs.DevApp/UserControl/UcLookItems.cs |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/UcLookItems.cs b/DevApp/Gs.DevApp/UserControl/UcLookItems.cs
index 6fdeffc..f201939 100644
--- a/DevApp/Gs.DevApp/UserControl/UcLookItems.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcLookItems.cs
@@ -19,6 +19,7 @@
         public UcLookItems()
         {
             InitializeComponent();
+            lookSearchSupplier.Properties.NullText = "璇烽�夋嫨";
             lookSearchSupplier.EditValueChanged +=
                 LookSearchSupplier_EditValueChanged;
 
@@ -46,14 +47,15 @@
             if (EditChanged != null) EditChanged(this, e);
         }
 
-        private void getSuppler()
+        private async void getSuppler()
         {
+            UcLoading _loading = new UcLoading();
             var pgq = new PageQueryModel(1, 999999, "item_name", "asc", "",
                 " and fforbidstatus='A'");
             var json = JsonConvert.SerializeObject(pgq);
             try
             {
-                var strReturn = UtilityHelper.HttpPost("",
+                var strReturn = await UtilityHelper.HttpPostAsync("",
                     "MesItemsManager/GetListPageByLook", json);
                 var rtn = UtilityHelper.ReturnToList(strReturn);
                 var dt = rtn.rtnData;
@@ -66,6 +68,7 @@
             {
                 MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
+            _loading.Close();
         }
 
         public string GetId()
@@ -96,14 +99,24 @@
         public string GetModel()
         {
             var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
-            string id = row["itemModel"].ToString();
-            return id;
+            if (row != null) {
+                string id = row["itemModel"].ToString();
+                return id;
+            }
+            return "";
         }
 
         public void SetIdOrCode(string Code)
         {
+            if (Code == "-1")
+            {
+                lookSearchSupplier.EditValue = null;
+                return;
+            }
             if (KeyFile == "id")
-                lookSearchSupplier.EditValue = Int64.Parse((Code.ToString().Trim()));
+            {
+                lookSearchSupplier.EditValue =((Code.ToString().Trim()));
+            }
             else
                 lookSearchSupplier.EditValue = ((Code.ToString().Trim()));
         }

--
Gitblit v1.9.3