From b6f3578e512bb1aa8f154fc92cd53485d15d610f Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 22 Jan 2021 13:48:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.U8/Base/MaterielTypeDAL.cs | 4 ++-- NX.ERP.U8/Base/SupplierDAL.cs | 6 +++--- NX.ERP.U8/Base/UnitDAL.cs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NX.ERP.U8/Base/MaterielTypeDAL.cs b/NX.ERP.U8/Base/MaterielTypeDAL.cs index 662be6e..a3f3de8 100644 --- a/NX.ERP.U8/Base/MaterielTypeDAL.cs +++ b/NX.ERP.U8/Base/MaterielTypeDAL.cs @@ -36,12 +36,12 @@ namespace NX.ERP.U8 where.Add(" cInvCName like @MaterielTypeName "); } - if (materielType.MaterialTypeGrade.HasValue) + if (!materielType.MaterialTypeGrade.HasValue) { where.Add(" iInvCGrade=@Level "); } - if (materielType.MaterialTypeIsend.HasValue) + if (!materielType.MaterialTypeIsend.HasValue) { where.Add(" bInvCEnd=@MaterialTypeIsend "); } diff --git a/NX.ERP.U8/Base/SupplierDAL.cs b/NX.ERP.U8/Base/SupplierDAL.cs index 151a515..9125afe 100644 --- a/NX.ERP.U8/Base/SupplierDAL.cs +++ b/NX.ERP.U8/Base/SupplierDAL.cs @@ -26,7 +26,7 @@ namespace NX.ERP.U8 { sql += $" where {strWhere}"; } - return conn.Query(sql, null); + return conn.Query(sql, Param); } } @@ -34,13 +34,13 @@ namespace NX.ERP.U8 public IEnumerable GetList(NX.ERP.Model.Request.Supplier Params) { IList where = new List(); - if (string.IsNullOrEmpty(Params.SupplierCode)) + if (!string.IsNullOrEmpty(Params.SupplierCode)) { where.Add(" cVenCode like @SupplierCode "); } - if (string.IsNullOrEmpty(Params.SupplierName)) + if (!string.IsNullOrEmpty(Params.SupplierName)) { where.Add(" cVenName like @SupplierName "); } diff --git a/NX.ERP.U8/Base/UnitDAL.cs b/NX.ERP.U8/Base/UnitDAL.cs index e1b0e22..036634c 100644 --- a/NX.ERP.U8/Base/UnitDAL.cs +++ b/NX.ERP.U8/Base/UnitDAL.cs @@ -21,7 +21,7 @@ namespace NX.ERP.U8 { sql += $" where {strWhere}"; } - return conn.Query(sql, null); + return conn.Query(sql, Param); } } @@ -29,13 +29,13 @@ namespace NX.ERP.U8 public IEnumerable GetList(NX.ERP.Model.Request.Unit Params) { IList where = new List(); - if (string.IsNullOrEmpty(Params.UnitCode)) + if (!string.IsNullOrEmpty(Params.UnitCode)) { where.Add(" cComunitCode like @UnitCode "); } - if (string.IsNullOrEmpty(Params.UnitName)) + if (!string.IsNullOrEmpty(Params.UnitName)) { where.Add(" cComUnitName like @UnitName "); }