From acb4d0f2ee702dadf3656126fa7c4feae03c0357 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期一, 11 十一月 2024 19:40:57 +0800 Subject: [PATCH] Merge branch 'master' of http://43.142.96.171:8080/r/~tjx/GsMesClient --- DevApp/Gs.DevApp/UserControl/UcLookItems.cs | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/UcLookItems.cs b/DevApp/Gs.DevApp/UserControl/UcLookItems.cs index 8bc9d49..f201939 100644 --- a/DevApp/Gs.DevApp/UserControl/UcLookItems.cs +++ b/DevApp/Gs.DevApp/UserControl/UcLookItems.cs @@ -99,8 +99,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 +114,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