Files
U8-Import/NX.ERP.U8/Base/WarehouseDAL.cs

28 lines
718 B
C#
Raw Normal View History

2021-01-05 11:11:28 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dapper;
using NX.ERP.Model;
namespace NX.ERP.U8
{
public class WarehouseDAL
{
2021-01-11 09:07:29 +08:00
public IEnumerable<Warehouse> GetList(string strWhere = "", object Param = null)
2021-01-05 11:11:28 +08:00
{
using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net))
{
2021-01-15 11:30:02 +08:00
var sql = "select cWhCode as Code,cWhName as Name from Warehouse";
2021-01-11 09:07:29 +08:00
if (!string.IsNullOrEmpty(strWhere))
{
sql += $" where {strWhere}";
}
return conn.Query<Warehouse>(sql, Param);
2021-01-05 11:11:28 +08:00
}
}
}
}