11
啊鑫
2024-11-21 d0eba72eb010cd9695d6811d49a2def4812041a4
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();
                }
            }
@@ -1017,14 +1021,25 @@
        }
        public static void SetCheckIco(object s, PictureBox btnChkIco, Form fm,string icoName="")
        /// <summary>
        ///
        /// </summary>
        /// <param name="s"></param>
        /// <param name="btnChkIco"></param>
        /// <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 = "")
        {
            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) {
                        var checkStatus = dgv.GetRowCellValue(selectedRow, "checkStatus").ToString(); // 获取指定列的值
                    if (selectedRow >= 0)
                    {
                        var checkStatus = dgv.GetRowCellValue(selectedRow, fileName).ToString(); // 获取指定列的值
                        btnChkIco.Text = checkStatus;
                        btnChkIco.Visible = true;
                        if (checkStatus == "1" || checkStatus.ToUpper() == true.ToString().ToUpper())