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 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(sql, Params); } } public IEnumerable GetListByWhCode(string Code) { return this.GetList(" cWhCode=@Code", new { Code }); } } }