28 lines
718 B
C#
28 lines
718 B
C#
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
|
|
{
|
|
public IEnumerable<Warehouse> GetList(string strWhere = "", object Param = null)
|
|
{
|
|
|
|
|
|
using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net))
|
|
{
|
|
var sql = "select cWhCode as Code,cWhName as Name from Warehouse";
|
|
if (!string.IsNullOrEmpty(strWhere))
|
|
{
|
|
sql += $" where {strWhere}";
|
|
}
|
|
return conn.Query<Warehouse>(sql, Param);
|
|
}
|
|
}
|
|
}
|
|
}
|