From d03513dbc057d6ce91b12ed8e87ffe0360d473b1 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 20 三月 2025 10:36:39 +0800 Subject: [PATCH] 销售 --- DevApp/Gs.DevApp/UserControl/SelectWwPc.cs | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/SelectWwPc.cs b/DevApp/Gs.DevApp/UserControl/SelectWwPc.cs index aa6f7b4..8f7a849 100644 --- a/DevApp/Gs.DevApp/UserControl/SelectWwPc.cs +++ b/DevApp/Gs.DevApp/UserControl/SelectWwPc.cs @@ -31,15 +31,12 @@ btnIn.Click += (s, e) => { var list = new List<string>(); - for (var i = 0; i < gridView1.DataRowCount; i++) + int[] rows = this.gridView1.GetSelectedRows();//鍏堣幏鍙栭�夋嫨琛岀殑琛屽彿 + DataTable dt = this.gcMain.DataSource as DataTable;//寰楀埌GridControl鐨勬暟鎹簮 + foreach (int idx in rows) { - var checkBox = gridView1.GetRowCellDisplayText(i, "gvChk"); - if (checkBox == "Checked") - { - var _guid = gridView1.GetRowCellValue(i, "guid") - .ToString(); - list.Add(_guid); - } + string _guid = dt.Rows[idx]["guid"].ToString(); + list.Add(_guid); } UpdateParent?.Invoke(this, new UpdateParentEventArgs { StringList = list }); -- Gitblit v1.9.3