添加查询条件
This commit is contained in:
@@ -9,7 +9,7 @@ namespace NX.ERP.U8
|
||||
{
|
||||
public class CustomerDAL
|
||||
{
|
||||
public IEnumerable<Customer> GetList()
|
||||
public IEnumerable<Customer> GetList(string strWhere="",object Param=null)
|
||||
{
|
||||
|
||||
|
||||
@@ -21,7 +21,11 @@ namespace NX.ERP.U8
|
||||
cCusPostCode AS PostalCode,
|
||||
cCusAddress AS Address,
|
||||
cCusPerson AS Contract,cCusPhone AS ContractPhone from Customer ";
|
||||
return conn.Query<Customer>(sql, null);
|
||||
if (!string.IsNullOrEmpty(strWhere))
|
||||
{
|
||||
sql += $" where {strWhere}";
|
||||
}
|
||||
return conn.Query<Customer>(sql, Param);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user