34 lines
980 B
C#
34 lines
980 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Dapper;
|
|
using NX.ERP.Model;
|
|
|
|
|
|
namespace NX.ERP.U8.Base
|
|
{
|
|
public class BinDAL
|
|
{
|
|
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 Code,cPosName as Name,iPosGrade,bPosEnd,cWhCode as WhCode,
|
|
iMaxCubage as VolumeLimit, iMaxweight as WeightLimit,cMemo,cBarCode from Position";
|
|
if (!string.IsNullOrEmpty(strwhere))
|
|
{
|
|
sql += $" where {strwhere}";
|
|
}
|
|
return conn.Query<Bin>(sql, Params);
|
|
}
|
|
}
|
|
|
|
|
|
public IEnumerable<Bin> GetListByWhCode(string Code)
|
|
{
|
|
return this.GetList(" cWhCode=@Code", new { Code });
|
|
}
|
|
}
|
|
}
|