From 9a47ecf102fd5a1547544b19922ebc0d02a1124c Mon Sep 17 00:00:00 2001 From: wule_5900x Date: Sat, 2 May 2026 19:53:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TalkForms/BuyerOrderListForm.Designer.cs | 328 ++++++++++-------- .../WXForms/TalkForms/BuyerOrderListForm.cs | 21 +- 2 files changed, 192 insertions(+), 157 deletions(-) diff --git a/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.Designer.cs b/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.Designer.cs index 3315ad2..73d9930 100644 --- a/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.Designer.cs +++ b/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.Designer.cs @@ -93,6 +93,22 @@ namespace TemuKJD.WXForms.TalkForms this.txtOrderSnFilter = new System.Windows.Forms.TextBox(); this.btnFilterOrder = new DevComponents.DotNetBar.PanelEx(); this.dgvPddBuyerOrder = new TemuKJD.UserComponent.DataGridViewEx(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.btnFilter = new DevComponents.DotNetBar.PanelEx(); + this.label3 = new System.Windows.Forms.Label(); + this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); + this.label17 = new System.Windows.Forms.Label(); + this.txtMobile = new System.Windows.Forms.TextBox(); + this.txtOrderSn = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.dtpStartTime = new System.Windows.Forms.DateTimePicker(); + this.label14 = new System.Windows.Forms.Label(); + this.dtpEndTime = new System.Windows.Forms.DateTimePicker(); + this.chkOnlyShowCurrentShop = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.lblCurrentShop = new System.Windows.Forms.Label(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.label1 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colOBuyerId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colOBuyerName = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -108,20 +124,6 @@ namespace TemuKJD.WXForms.TalkForms this.colOMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSend = new System.Windows.Forms.DataGridViewLinkColumn(); this.colAfterSale = new System.Windows.Forms.DataGridViewLinkColumn(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.btnFilter = new DevComponents.DotNetBar.PanelEx(); - this.label3 = new System.Windows.Forms.Label(); - this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); - this.label17 = new System.Windows.Forms.Label(); - this.txtMobile = new System.Windows.Forms.TextBox(); - this.txtOrderSn = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.dtpStartTime = new System.Windows.Forms.DateTimePicker(); - this.label14 = new System.Windows.Forms.Label(); - this.dtpEndTime = new System.Windows.Forms.DateTimePicker(); - this.chkOnlyShowCurrentShop = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.lblCurrentShop = new System.Windows.Forms.Label(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.dataGridViewCheckBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colRBuyerId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colRBuyerName = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -136,6 +138,7 @@ namespace TemuKJD.WXForms.TalkForms this.colRStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colRMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewLinkColumn1 = new System.Windows.Forms.DataGridViewLinkColumn(); + this.txtOrderMsgFilter = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -726,12 +729,15 @@ namespace TemuKJD.WXForms.TalkForms // // panel2 // + this.panel2.Controls.Add(this.txtOrderMsgFilter); + this.panel2.Controls.Add(this.label4); + this.panel2.Controls.Add(this.txtOrderSnFilter); + this.panel2.Controls.Add(this.label1); this.panel2.Controls.Add(this.dgvAfterSale); this.panel2.Controls.Add(this.btnExchange); this.panel2.Controls.Add(this.pictureBox1); this.panel2.Controls.Add(this.lblMsg); this.panel2.Controls.Add(this.btnRestore); - this.panel2.Controls.Add(this.txtOrderSnFilter); this.panel2.Controls.Add(this.btnFilterOrder); this.panel2.Controls.Add(this.dgvPddBuyerOrder); this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom; @@ -825,7 +831,7 @@ namespace TemuKJD.WXForms.TalkForms // lblMsg // this.lblMsg.AutoSize = true; - this.lblMsg.Location = new System.Drawing.Point(400, 15); + this.lblMsg.Location = new System.Drawing.Point(1, 27); this.lblMsg.Name = "lblMsg"; this.lblMsg.Size = new System.Drawing.Size(48, 17); this.lblMsg.TabIndex = 914; @@ -837,7 +843,7 @@ namespace TemuKJD.WXForms.TalkForms this.btnRestore.CanvasColor = System.Drawing.SystemColors.Control; this.btnRestore.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnRestore.DisabledBackColor = System.Drawing.Color.Empty; - this.btnRestore.Location = new System.Drawing.Point(318, 12); + this.btnRestore.Location = new System.Drawing.Point(735, 3); this.btnRestore.Name = "btnRestore"; this.btnRestore.Size = new System.Drawing.Size(61, 23); this.btnRestore.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -858,7 +864,7 @@ namespace TemuKJD.WXForms.TalkForms // // txtOrderSnFilter // - this.txtOrderSnFilter.Location = new System.Drawing.Point(3, 12); + this.txtOrderSnFilter.Location = new System.Drawing.Point(124, 3); this.txtOrderSnFilter.Name = "txtOrderSnFilter"; this.txtOrderSnFilter.Size = new System.Drawing.Size(242, 23); this.txtOrderSnFilter.TabIndex = 903; @@ -869,7 +875,7 @@ namespace TemuKJD.WXForms.TalkForms this.btnFilterOrder.Cursor = System.Windows.Forms.Cursors.Hand; this.btnFilterOrder.DisabledBackColor = System.Drawing.Color.Empty; this.btnFilterOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnFilterOrder.Location = new System.Drawing.Point(251, 12); + this.btnFilterOrder.Location = new System.Drawing.Point(672, 3); this.btnFilterOrder.Name = "btnFilterOrder"; this.btnFilterOrder.Size = new System.Drawing.Size(61, 23); this.btnFilterOrder.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -934,119 +940,6 @@ namespace TemuKJD.WXForms.TalkForms this.dgvPddBuyerOrder.TabIndex = 886; this.dgvPddBuyerOrder.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPddBuyerOrder_CellContentClick); // - // dataGridViewCheckBoxColumn1 - // - this.dataGridViewCheckBoxColumn1.FillWeight = 26F; - this.dataGridViewCheckBoxColumn1.HeaderText = "选"; - this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1"; - this.dataGridViewCheckBoxColumn1.ReadOnly = true; - this.dataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridViewCheckBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - // - // colOBuyerId - // - this.colOBuyerId.HeaderText = "买手编号"; - this.colOBuyerId.Name = "colOBuyerId"; - this.colOBuyerId.ReadOnly = true; - this.colOBuyerId.Visible = false; - // - // colOBuyerName - // - this.colOBuyerName.FillWeight = 80F; - this.colOBuyerName.HeaderText = "买手名称"; - this.colOBuyerName.Name = "colOBuyerName"; - this.colOBuyerName.ReadOnly = true; - // - // colOPddOrderSn - // - this.colOPddOrderSn.HeaderText = "拍单订单号"; - this.colOPddOrderSn.Name = "colOPddOrderSn"; - this.colOPddOrderSn.ReadOnly = true; - // - // colOOrderTime - // - dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colOOrderTime.DefaultCellStyle = dataGridViewCellStyle15; - this.colOOrderTime.FillWeight = 70F; - this.colOOrderTime.HeaderText = "拍单时间"; - this.colOOrderTime.Name = "colOOrderTime"; - this.colOOrderTime.ReadOnly = true; - // - // colOImgUrl - // - this.colOImgUrl.HeaderText = "图片路径"; - this.colOImgUrl.Name = "colOImgUrl"; - this.colOImgUrl.ReadOnly = true; - this.colOImgUrl.Visible = false; - // - // colOImg - // - this.colOImg.FillWeight = 35F; - this.colOImg.HeaderText = "订单图片"; - this.colOImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; - this.colOImg.Name = "colOImg"; - this.colOImg.ReadOnly = true; - this.colOImg.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colOImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colOImg.Visible = false; - // - // colOGoodsInfo - // - dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colOGoodsInfo.DefaultCellStyle = dataGridViewCellStyle16; - this.colOGoodsInfo.FillWeight = 140F; - this.colOGoodsInfo.HeaderText = "商品信息"; - this.colOGoodsInfo.Name = "colOGoodsInfo"; - this.colOGoodsInfo.ReadOnly = true; - // - // colOOrderAmount - // - this.colOOrderAmount.FillWeight = 50F; - this.colOOrderAmount.HeaderText = "金额"; - this.colOOrderAmount.Name = "colOOrderAmount"; - this.colOOrderAmount.ReadOnly = true; - // - // colOStatus - // - this.colOStatus.HeaderText = "订单状态"; - this.colOStatus.Name = "colOStatus"; - this.colOStatus.ReadOnly = true; - // - // colOExpressName - // - this.colOExpressName.HeaderText = "物流名称"; - this.colOExpressName.Name = "colOExpressName"; - this.colOExpressName.ReadOnly = true; - // - // colOExpressId - // - this.colOExpressId.HeaderText = "物流单号"; - this.colOExpressId.Name = "colOExpressId"; - this.colOExpressId.ReadOnly = true; - // - // colOMsg - // - this.colOMsg.HeaderText = "其他信息"; - this.colOMsg.Name = "colOMsg"; - this.colOMsg.ReadOnly = true; - // - // colSend - // - this.colSend.FillWeight = 50F; - this.colSend.HeaderText = "发送"; - this.colSend.Name = "colSend"; - this.colSend.ReadOnly = true; - this.colSend.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colSend.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - // - // colAfterSale - // - this.colAfterSale.FillWeight = 50F; - this.colAfterSale.HeaderText = "退货"; - this.colAfterSale.Name = "colAfterSale"; - this.colAfterSale.ReadOnly = true; - this.colAfterSale.Visible = false; - // // tableLayoutPanel1 // this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -1260,6 +1153,137 @@ namespace TemuKJD.WXForms.TalkForms this.statusBar.Size = new System.Drawing.Size(1438, 25); this.statusBar.TabIndex = 5; // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(1, 6); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(126, 17); + this.label1.TabIndex = 951; + this.label1.Text = "买手/订单号/售后单号"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(372, 6); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(56, 17); + this.label4.TabIndex = 952; + this.label4.Text = "订单信息"; + // + // dataGridViewCheckBoxColumn1 + // + this.dataGridViewCheckBoxColumn1.FillWeight = 26F; + this.dataGridViewCheckBoxColumn1.HeaderText = "选"; + this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1"; + this.dataGridViewCheckBoxColumn1.ReadOnly = true; + this.dataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridViewCheckBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colOBuyerId + // + this.colOBuyerId.HeaderText = "买手编号"; + this.colOBuyerId.Name = "colOBuyerId"; + this.colOBuyerId.ReadOnly = true; + this.colOBuyerId.Visible = false; + // + // colOBuyerName + // + this.colOBuyerName.FillWeight = 80F; + this.colOBuyerName.HeaderText = "买手名称"; + this.colOBuyerName.Name = "colOBuyerName"; + this.colOBuyerName.ReadOnly = true; + // + // colOPddOrderSn + // + this.colOPddOrderSn.HeaderText = "拍单订单号"; + this.colOPddOrderSn.Name = "colOPddOrderSn"; + this.colOPddOrderSn.ReadOnly = true; + // + // colOOrderTime + // + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colOOrderTime.DefaultCellStyle = dataGridViewCellStyle15; + this.colOOrderTime.FillWeight = 70F; + this.colOOrderTime.HeaderText = "拍单时间"; + this.colOOrderTime.Name = "colOOrderTime"; + this.colOOrderTime.ReadOnly = true; + // + // colOImgUrl + // + this.colOImgUrl.HeaderText = "图片路径"; + this.colOImgUrl.Name = "colOImgUrl"; + this.colOImgUrl.ReadOnly = true; + this.colOImgUrl.Visible = false; + // + // colOImg + // + this.colOImg.FillWeight = 35F; + this.colOImg.HeaderText = "订单图片"; + this.colOImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colOImg.Name = "colOImg"; + this.colOImg.ReadOnly = true; + this.colOImg.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colOImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colOImg.Visible = false; + // + // colOGoodsInfo + // + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colOGoodsInfo.DefaultCellStyle = dataGridViewCellStyle16; + this.colOGoodsInfo.FillWeight = 140F; + this.colOGoodsInfo.HeaderText = "商品信息"; + this.colOGoodsInfo.Name = "colOGoodsInfo"; + this.colOGoodsInfo.ReadOnly = true; + // + // colOOrderAmount + // + this.colOOrderAmount.FillWeight = 50F; + this.colOOrderAmount.HeaderText = "金额"; + this.colOOrderAmount.Name = "colOOrderAmount"; + this.colOOrderAmount.ReadOnly = true; + // + // colOStatus + // + this.colOStatus.HeaderText = "订单状态"; + this.colOStatus.Name = "colOStatus"; + this.colOStatus.ReadOnly = true; + // + // colOExpressName + // + this.colOExpressName.HeaderText = "物流名称"; + this.colOExpressName.Name = "colOExpressName"; + this.colOExpressName.ReadOnly = true; + // + // colOExpressId + // + this.colOExpressId.HeaderText = "物流单号"; + this.colOExpressId.Name = "colOExpressId"; + this.colOExpressId.ReadOnly = true; + // + // colOMsg + // + this.colOMsg.HeaderText = "订单信息"; + this.colOMsg.Name = "colOMsg"; + this.colOMsg.ReadOnly = true; + // + // colSend + // + this.colSend.FillWeight = 50F; + this.colSend.HeaderText = "发送"; + this.colSend.Name = "colSend"; + this.colSend.ReadOnly = true; + this.colSend.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSend.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colAfterSale + // + this.colAfterSale.FillWeight = 50F; + this.colAfterSale.HeaderText = "退货"; + this.colAfterSale.Name = "colAfterSale"; + this.colAfterSale.ReadOnly = true; + this.colAfterSale.Visible = false; + // // dataGridViewCheckBoxColumn2 // this.dataGridViewCheckBoxColumn2.FillWeight = 26F; @@ -1354,7 +1378,7 @@ namespace TemuKJD.WXForms.TalkForms // // colRMsg // - this.colRMsg.HeaderText = "发送信息"; + this.colRMsg.HeaderText = "订单信息"; this.colRMsg.Name = "colRMsg"; this.colRMsg.ReadOnly = true; // @@ -1367,6 +1391,13 @@ namespace TemuKJD.WXForms.TalkForms this.dataGridViewLinkColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.dataGridViewLinkColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; // + // txtOrderMsgFilter + // + this.txtOrderMsgFilter.Location = new System.Drawing.Point(425, 3); + this.txtOrderMsgFilter.Name = "txtOrderMsgFilter"; + this.txtOrderMsgFilter.Size = new System.Drawing.Size(242, 23); + this.txtOrderMsgFilter.TabIndex = 953; + // // BuyerOrderListForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1474,6 +1505,22 @@ namespace TemuKJD.WXForms.TalkForms private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; private DevComponents.DotNetBar.PanelEx btnExchange; private UserComponent.DataGridViewEx dgvAfterSale; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn colRBuyerId; + private System.Windows.Forms.DataGridViewTextBoxColumn colRBuyerName; + private System.Windows.Forms.DataGridViewTextBoxColumn colRAfterSaleId; + private System.Windows.Forms.DataGridViewTextBoxColumn colRPddOrderSn; + private System.Windows.Forms.DataGridViewTextBoxColumn colROrderDate; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; + private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1; + private System.Windows.Forms.DataGridViewTextBoxColumn colRGoodsInfo; + private System.Windows.Forms.DataGridViewTextBoxColumn colROrderAmount; + private System.Windows.Forms.DataGridViewTextBoxColumn colRRefundAmount; + private System.Windows.Forms.DataGridViewTextBoxColumn colRStatus; + private System.Windows.Forms.DataGridViewTextBoxColumn colRMsg; + private System.Windows.Forms.DataGridViewLinkColumn dataGridViewLinkColumn1; private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1; private System.Windows.Forms.DataGridViewTextBoxColumn colOBuyerId; private System.Windows.Forms.DataGridViewTextBoxColumn colOBuyerName; @@ -1489,19 +1536,6 @@ namespace TemuKJD.WXForms.TalkForms private System.Windows.Forms.DataGridViewTextBoxColumn colOMsg; private System.Windows.Forms.DataGridViewLinkColumn colSend; private System.Windows.Forms.DataGridViewLinkColumn colAfterSale; - private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn2; - private System.Windows.Forms.DataGridViewTextBoxColumn colRBuyerId; - private System.Windows.Forms.DataGridViewTextBoxColumn colRBuyerName; - private System.Windows.Forms.DataGridViewTextBoxColumn colRAfterSaleId; - private System.Windows.Forms.DataGridViewTextBoxColumn colRPddOrderSn; - private System.Windows.Forms.DataGridViewTextBoxColumn colROrderDate; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; - private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1; - private System.Windows.Forms.DataGridViewTextBoxColumn colRGoodsInfo; - private System.Windows.Forms.DataGridViewTextBoxColumn colROrderAmount; - private System.Windows.Forms.DataGridViewTextBoxColumn colRRefundAmount; - private System.Windows.Forms.DataGridViewTextBoxColumn colRStatus; - private System.Windows.Forms.DataGridViewTextBoxColumn colRMsg; - private System.Windows.Forms.DataGridViewLinkColumn dataGridViewLinkColumn1; + private System.Windows.Forms.TextBox txtOrderMsgFilter; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.cs b/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.cs index 0ebe54e..789a882 100644 --- a/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.cs +++ b/TEMUKJD/WXForms/TalkForms/BuyerOrderListForm.cs @@ -1722,21 +1722,22 @@ namespace TemuKJD.WXForms.TalkForms { foreach(DataGridViewRow row in dgvPddBuyerOrder.Rows) { - if (row.Cells["colOPddOrderSn"].Value.ParseToString().Contains(txtOrderSnFilter.Text.Trim())) - row.Visible = true; - else if (row.Cells["colOBuyerName"].Value.ParseToString().Contains(txtOrderSnFilter.Text.Trim())) - row.Visible = true; - else + if (!row.Cells["colOPddOrderSn"].Value.ParseToString().Contains(txtOrderSnFilter.Text.Trim()) && !row.Cells["colOBuyerName"].Value.ParseToString().Contains(txtOrderSnFilter.Text.Trim())) row.Visible = false; + else if (!row.Cells["colOMsg"].Value.ParseToString().Contains(txtOrderMsgFilter.Text.Trim())) + row.Visible = false; + else + row.Visible = true; } foreach (DataGridViewRow row in dgvAfterSale.Rows) { - if (row.Cells["colRPddOrderSn"].Value.ParseToString().Contains(txtOrderSnFilter.Text.Trim())) - row.Visible = true; - else if (row.Cells["colRAfterSaleId"].Value.ParseToString().Contains(txtOrderSnFilter.Text.Trim())) - row.Visible = true; - else + if (!row.Cells["colRPddOrderSn"].Value.ParseToString().Contains(txtOrderSnFilter.Text.Trim()) && !row.Cells["colRBuyerName"].Value.ParseToString().Contains(txtOrderSnFilter.Text.Trim()) && + !row.Cells["colRAfterSaleId"].Value.ParseToString().Contains(txtOrderSnFilter.Text.Trim())) row.Visible = false; + else if (!row.Cells["colRMsg"].Value.ParseToString().Contains(txtOrderMsgFilter.Text.Trim())) + row.Visible = false; + else + row.Visible = true; } }