From d0eba72eb010cd9695d6811d49a2def4812041a4 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期四, 21 十一月 2024 19:05:28 +0800
Subject: [PATCH] 11
---
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index cc511a4..da48bf5 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -865,6 +865,7 @@
, Label lbGuid
, TextEdit txtName
, GridView gridView1
+ , string fileName = ""
, int SelectedTabPageIndex = 1)
{
var _strGuid = "";
@@ -884,7 +885,10 @@
else
{
_strGuid = dr["guid"].ToString();
- _strName = dr[1].ToString();
+ if (string.IsNullOrEmpty(fileName))
+ _strName = dr[1].ToString();
+ else
+ _strName = dr[fileName].ToString();
}
}
@@ -1025,13 +1029,16 @@
/// <param name="fm"></param>
/// <param name="fileName">瀵瑰簲鐨勫鏍稿瓧娈靛悕绉�</param>
/// <param name="icoName"></param>
- public static void SetCheckIco(object s, PictureBox btnChkIco, Form fm,string fileName= "checkStatus", string icoName="")
+ public static void SetCheckIco(object s, PictureBox btnChkIco, Form fm, string fileName = "checkStatus", string icoName = "")
{
GridView dgv = s as GridView;
- if (dgv != null) {
- if (dgv.GetSelectedRows() != null) {
+ if (dgv != null)
+ {
+ if (dgv.GetSelectedRows() != null)
+ {
var selectedRow = dgv.GetSelectedRows()[0]; // 鑾峰彇绗竴涓�変腑琛岀殑绱㈠紩
- if (selectedRow >= 0) {
+ if (selectedRow >= 0)
+ {
var checkStatus = dgv.GetRowCellValue(selectedRow, fileName).ToString(); // 鑾峰彇鎸囧畾鍒楃殑鍊�
btnChkIco.Text = checkStatus;
btnChkIco.Visible = true;
--
Gitblit v1.9.3