添加查询条件
This commit is contained in:
@@ -10,13 +10,17 @@ namespace NX.ERP.U8
|
||||
{
|
||||
public class UnitDAL
|
||||
{
|
||||
public IEnumerable<Unit> GetList()
|
||||
public IEnumerable<Unit> GetList(string strWhere = "", object Param = null)
|
||||
{
|
||||
using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net))
|
||||
{
|
||||
var sql = @"select
|
||||
cComunitCode AS UnitCode,
|
||||
cComUnitName AS UnitName,bMainUnit as MainUnit, cGroupCode as GroupCode from ComputationUnit ";
|
||||
if (!string.IsNullOrEmpty(strWhere))
|
||||
{
|
||||
sql += $" where {strWhere}";
|
||||
}
|
||||
return conn.Query<Unit>(sql, null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user