添加查询条件
This commit is contained in:
@@ -10,13 +10,17 @@ namespace NX.ERP.U8.Base
|
||||
{
|
||||
public class BinDAL
|
||||
{
|
||||
public IEnumerable<Bin> GetList()
|
||||
public IEnumerable<Bin> GetList(string strwhere="",object Params=null)
|
||||
{
|
||||
using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net))
|
||||
{
|
||||
var sql = @"select cPosCode as BinCode,cPosName as BinName,iPosGrade,bPosEnd,cWhCode as WarehouseCode,
|
||||
iMaxCubage as VolumeLimit, iMaxweight as WeightLimit,cMemo,cBarCode from Position";
|
||||
return conn.Query<Bin>(sql, null);
|
||||
if (!string.IsNullOrEmpty(strwhere))
|
||||
{
|
||||
sql += $" where {strwhere}";
|
||||
}
|
||||
return conn.Query<Bin>(sql, Params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user