mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 14:37:16 +00:00
Feature: stock replenishment
This commit is contained in:
@@ -15,12 +15,12 @@ namespace bnhtrade.Core.Logic.Account
|
||||
readAccountCode = new Data.Database.Account.ReadAccountCode();
|
||||
}
|
||||
|
||||
public List<Model.Account.AccountCode> GetAll()
|
||||
public Dictionary<uint, Model.Account.Account> GetAll()
|
||||
{
|
||||
return readAccountCode.All();
|
||||
}
|
||||
|
||||
public Model.Account.AccountCode ByAccountCode(int accountCode)
|
||||
public Model.Account.Account ByAccountCode(int accountCode)
|
||||
{
|
||||
var list = ByAccountCode(new List<int> { accountCode });
|
||||
if (list.Any())
|
||||
@@ -33,14 +33,14 @@ namespace bnhtrade.Core.Logic.Account
|
||||
}
|
||||
}
|
||||
|
||||
public List<Model.Account.AccountCode> ByAccountCode(List<int> accountCodeList)
|
||||
public List<Model.Account.Account> ByAccountCode(List<int> accountCodeList)
|
||||
{
|
||||
return readAccountCode.ByAccountCode(accountCodeList);
|
||||
}
|
||||
|
||||
public Dictionary<int, Model.Account.AccountCode> ConvertToDictionary(List<Model.Account.AccountCode> accountCodeList)
|
||||
public Dictionary<int, Model.Account.Account> ConvertToDictionary(List<Model.Account.Account> accountCodeList)
|
||||
{
|
||||
var returnDict = new Dictionary<int, Model.Account.AccountCode>();
|
||||
var returnDict = new Dictionary<int, Model.Account.Account>();
|
||||
|
||||
if (accountCodeList == null)
|
||||
{
|
||||
@@ -49,9 +49,9 @@ namespace bnhtrade.Core.Logic.Account
|
||||
|
||||
foreach (var accountCode in accountCodeList)
|
||||
{
|
||||
if (!returnDict.ContainsKey(accountCode.AccountCodeId))
|
||||
if (!returnDict.ContainsKey((int)accountCode.AccountCode))
|
||||
{
|
||||
returnDict.Add(accountCode.AccountCodeId, accountCode);
|
||||
returnDict.Add((int)accountCode.AccountCode, accountCode);
|
||||
}
|
||||
}
|
||||
return returnDict;
|
||||
|
||||
Reference in New Issue
Block a user