Files
U8-Import/NX.ERP.U8/Base/SupplierDAL.cs
2021-01-11 09:07:29 +08:00

33 lines
928 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 SupplierDAL
{
public IEnumerable<Supplier> GetList(string strWhere = "", object Param = null)
{
using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net))
{
var sql = @"select
cVenCode AS SupplierCode,
cVenName AS SupplierName,
cVenPostCode AS PostalCode,
cVenAddress AS Address,
cVenPerson AS Contract from Vendor ";
if (!string.IsNullOrEmpty(strWhere))
{
sql += $" where {strWhere}";
}
return conn.Query<Supplier>(sql, null);
}
}
}
}