mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 22:47:15 +00:00
Feature repricing min max (#10)
amazon settlement import/export improvements
This commit is contained in:
44
src/bnhtrade.Core/Logic/Validate/SkuTransaction.cs
Normal file
44
src/bnhtrade.Core/Logic/Validate/SkuTransaction.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.Logic.Validate
|
||||
{
|
||||
public class SkuTransaction : Validate
|
||||
{
|
||||
public bool DatabaseUpdate(Model.Stock.SkuTransaction skuTransaction)
|
||||
{
|
||||
return IsValid(new List<Model.Stock.SkuTransaction> { skuTransaction });
|
||||
}
|
||||
|
||||
public bool DatabaseUpdate(List<Model.Stock.SkuTransaction> skuTransactionList)
|
||||
{
|
||||
if (!IsValid(skuTransactionList))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < skuTransactionList.Count; i++)
|
||||
{
|
||||
if (!skuTransactionList[i].IsSetSkuTransactionId)
|
||||
{
|
||||
ValidationResultAdd("StockTransactionId is required");
|
||||
}
|
||||
}
|
||||
|
||||
return IsValidResult;
|
||||
}
|
||||
|
||||
public bool DatabaseInsert(Model.Stock.SkuTransaction skuTransaction)
|
||||
{
|
||||
return IsValid(new List<Model.Stock.SkuTransaction> { skuTransaction });
|
||||
}
|
||||
|
||||
public bool DatabaseInsert(List<Model.Stock.SkuTransaction> skuTransactionList)
|
||||
{
|
||||
return IsValid(skuTransactionList);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user