From 05731195c2c3d5adcbefd2bc18f12ebe84b0d68a Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 02 十二月 2024 09:49:54 +0800
Subject: [PATCH] 其它业务

---
 DevApp/Gs.DevApp/UserControl/UcLookItems.cs |   34 +++++++++++++++++++++-------------
 1 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/UcLookItems.cs b/DevApp/Gs.DevApp/UserControl/UcLookItems.cs
index 8bc9d49..8cac2ee 100644
--- a/DevApp/Gs.DevApp/UserControl/UcLookItems.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcLookItems.cs
@@ -24,7 +24,7 @@
                 LookSearchSupplier_EditValueChanged;
 
         }
-
+        public bool IsReadly { get; set; }
         private string _KeyFile = "";
         public string KeyFile
         {
@@ -49,16 +49,20 @@
 
         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);
+            var _obj = new
+            {
+                currentPage = 1,
+                everyPageSize = 999999,
+                sortName = "",
+                keyWhere = "",
+            };
+            var json = JsonConvert.SerializeObject(_obj);
             try
             {
-                var strReturn = await UtilityHelper.HttpPostAsync("",
-                    "MesItemsManager/GetListPageByLook", json);
-                var rtn = UtilityHelper.ReturnToList(strReturn);
-                var dt = rtn.rtnData;
+                var strReturn =  UtilityHelper.HttpPost("",
+                    "MesItemsManager/GetListSelect", json);
+                var rtn = UtilityHelper.ReturnToTablePage(strReturn);
+                var dt = rtn.rtnData.list;
                 lookSearchSupplier.Properties.DataSource = dt;
                 lookSearchSupplier.Properties.DisplayMember = "itemName";
                 // lookSearchSupplier.Properties.ValueMember = "depotId";
@@ -68,7 +72,6 @@
             {
                 MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
-            _loading.Close();
         }
 
         public string GetId()
@@ -99,8 +102,11 @@
         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)
@@ -111,7 +117,9 @@
                 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