From f77c2f620c09c9a49b49db1114534c0aeaa49696 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期六, 15 三月 2025 16:51:54 +0800 Subject: [PATCH] 样本 --- DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs index faebd02..9eea9e9 100644 --- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs +++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs @@ -1374,6 +1374,11 @@ return 0; } } + public static decimal? GetDecimal(string s) + { + if (string.IsNullOrEmpty(s)) return null; + return decimal.Parse(s); + } public static int ToInt(string str) { try @@ -1595,7 +1600,7 @@ GridView dgv = s as GridView; if (dgv != null) { - if (dgv.GetSelectedRows() != null) + if (dgv.GetSelectedRows() != null && dgv.GetSelectedRows().Count()>0) { var selectedRow = dgv.GetSelectedRows()[0]; // 鑾峰彇绗竴涓�変腑琛岀殑绱㈠紩 if (selectedRow >= 0) -- Gitblit v1.9.3