From fad2478c12172e84ffb47ae2b97654108ee8856c Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 28 十一月 2024 14:36:06 +0800 Subject: [PATCH] 车间产线下拉 --- DevApp/Gs.DevApp/UserControl/UcLookWorkline.cs | 23 ++++++++--------------- 1 files changed, 8 insertions(+), 15 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/UcLookWorkline.cs b/DevApp/Gs.DevApp/UserControl/UcLookWorkline.cs index 7c95a9f..2712f12 100644 --- a/DevApp/Gs.DevApp/UserControl/UcLookWorkline.cs +++ b/DevApp/Gs.DevApp/UserControl/UcLookWorkline.cs @@ -21,16 +21,10 @@ { InitializeComponent(); lookSearchSupplier.Properties.NullText = "璇烽�夋嫨"; - lookSearchSupplier.EditValueChanged += - LookSearchSupplier_EditValueChanged; + lookSearchSupplier.EditValueChanged += LookSearchSupplier_EditValueChanged; } public bool IsReadly { get; set; } - private string _KeyFile = ""; - public string KeyFile - { - get { return _KeyFile; } - set { _KeyFile = value; } - } + /// <summary> /// 鏀瑰彉浜嬩欢 /// </summary> @@ -44,6 +38,8 @@ public void getSuppler(string shopGuid) { + if (string.IsNullOrEmpty(shopGuid)) + return; var _obj = new { guid = shopGuid //涓诲缓 @@ -52,18 +48,15 @@ try { var strReturn = UtilityHelper.HttpPost("", - "MesWorkshopManager/GetModel", json); + "SysDepartmentManager/GetModel", json); var _job = JObject.Parse(strReturn); var array = new JArray(); var d = _job["rtnData"]["list"]; foreach (var a in d) array.Add(a); - var dt = - JsonConvert.DeserializeObject<DataTable>( - array.ToString()); + var dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); lookSearchSupplier.Properties.DataSource = dt; lookSearchSupplier.Properties.DisplayMember = "name"; - // lookSearchSupplier.Properties.ValueMember = "suppNo"; - lookSearchSupplier.Properties.ValueMember = KeyFile; + lookSearchSupplier.Properties.ValueMember = "id"; } catch (Exception ex) { @@ -76,7 +69,7 @@ var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView; if (row != null) { - string id = row["guid"].ToString(); + string id = row["id"].ToString(); return id; } return ""; -- Gitblit v1.9.3