mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 06:27:15 +00:00
Bug fix: Error thrown on list containing null item
This commit is contained in:
@@ -125,6 +125,8 @@ namespace bnhtrade.Core.Data.Database.Stock
|
|||||||
|
|
||||||
public List<Model.Stock.SkuTransactionType> ByTypeCode(List<string> typeCode)
|
public List<Model.Stock.SkuTransactionType> ByTypeCode(List<string> typeCode)
|
||||||
{
|
{
|
||||||
|
typeCode.RemoveAll(string.IsNullOrWhiteSpace);
|
||||||
|
|
||||||
string sqlWhere = @"
|
string sqlWhere = @"
|
||||||
WHERE TypeCode IN @typeCode ";
|
WHERE TypeCode IN @typeCode ";
|
||||||
|
|
||||||
@@ -136,6 +138,8 @@ namespace bnhtrade.Core.Data.Database.Stock
|
|||||||
|
|
||||||
public List<Model.Stock.SkuTransactionType> ByTypeName(List<string> typeName)
|
public List<Model.Stock.SkuTransactionType> ByTypeName(List<string> typeName)
|
||||||
{
|
{
|
||||||
|
typeName.RemoveAll(string.IsNullOrWhiteSpace);
|
||||||
|
|
||||||
string sqlWhere = @"
|
string sqlWhere = @"
|
||||||
WHERE TypeName IN @typeName ";
|
WHERE TypeName IN @typeName ";
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ namespace bnhtrade.Core.Logic.Stock
|
|||||||
{
|
{
|
||||||
CacheInnit();
|
CacheInnit();
|
||||||
|
|
||||||
|
typeCodeList.RemoveAll(string.IsNullOrWhiteSpace);
|
||||||
|
|
||||||
if (typeCodeList == null || !typeCodeList.Any())
|
if (typeCodeList == null || !typeCodeList.Any())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user