From 9c38dbf93ea5b7dea6b34b03cb3143812b20147d Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期三, 02 七月 2025 23:05:41 +0800 Subject: [PATCH] BUG --- DevApp/Gs.DevApp/UserControl/SelectDeleteBar.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 56 insertions(+), 4 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/SelectDeleteBar.cs b/DevApp/Gs.DevApp/UserControl/SelectDeleteBar.cs index 968353d..cfc26e9 100644 --- a/DevApp/Gs.DevApp/UserControl/SelectDeleteBar.cs +++ b/DevApp/Gs.DevApp/UserControl/SelectDeleteBar.cs @@ -1,5 +1,7 @@ 锘縰sing DevExpress.Utils.DirectXPaint; +using DevExpress.Utils.VisualEffects; using DevExpress.XtraGrid.Views.Base.ViewInfo; +using Gs.DevApp.DevFrm.Rpt; using Gs.DevApp.ToolBox; using Newtonsoft.Json; using System; @@ -14,11 +16,14 @@ private readonly string _webServiceName = "VArrivalBarcodeManager/"; private string aboutGuid = ""; private string aboutType = "";//鍚庣洊鐮� + /// <summary> - /// 鐖朵翰guid + /// /// </summary> - /// <param name="_aboutGuid"></param> - public SelectDeleteBar(string _aboutGuid, string _aboutType) + /// <param name="_aboutGuid">鐖朵翰guid</param> + /// <param name="_aboutType">绫诲埆锛堝悗鐩栫爜锛岃拷婧爜锛屽彈鎵樺叆搴撶瓑锛�</param> + /// <param name="_qcGuid">qcGuid锛屽湪杩斿伐閲嶆潯鐨勬椂鍊�</param> + public SelectDeleteBar(string _aboutGuid, string _aboutType,string _qcGuid="") { InitializeComponent(); this.gridView1.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); }; @@ -29,6 +34,23 @@ this.colChkInt.OptionsFilter.AllowInHeaderSearch = DevExpress.Utils.DefaultBoolean.False; this.aboutGuid = _aboutGuid; this.aboutType = _aboutType; + this.Text = "鎵归噺鎿嶄綔銆�" + this.aboutType + "銆�,銆�" + this.aboutGuid + "銆�"; + switch (aboutType) + { + case "鍚庣洊鐮�": + btnDelete.Visible = true; + colT1.Caption = "缁戝畾鎵樻澘鐮�"; + colT2.Caption = "缁戝畾杩芥函鐮�"; + break; + case "杩芥函鐮�": + colT1.Caption = "绾夸綋缂栧彿"; + colT2.Caption = "绾夸綋鍚嶇О"; + break; + default: + colT1.Caption = "鍏ュ簱浜�"; + colT2.Caption = "鍏ュ簱鏃ユ湡"; + break; + } Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false); getPageList(1); btnDelete.Click += (s, e) => @@ -73,7 +95,8 @@ strMsg = "1"; MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); } - else { + else + { MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); return; } @@ -84,6 +107,33 @@ return; } UpdateParent?.Invoke(this, new UpdateParentEventArgs { StringSingle = strMsg }); Close(); + }; + btnPrint.Click += (s, e) => + { + gridView1.PostEditor(); + gridView1.UpdateCurrentRow(); + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + DataTable dt = this.gcMain.DataSource as DataTable; + { + foreach (DataRow dr in dt.Rows) + { + string checkBox = dr["chkInt"].ToString(); + string _guid = dr["guid"].ToString(); + if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox)) + { + if (sb.Length > 0) + sb.Append("|"); + sb.Append(_guid.ToString()); + } + } + } + if (sb.Length <= 0) + { + MsgHelper.Warning("璇峰嬀閫変綘瑕佹墦鍗扮殑鏉$爜锛�"); + return; + } + + UpdateParent?.Invoke(this, new UpdateParentEventArgs { StringSingle = sb.ToString() }); Close(); }; } @@ -124,5 +174,7 @@ MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } } + + } } \ No newline at end of file -- Gitblit v1.9.3