mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 14:37:16 +00:00
45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|