mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-05-18 19:48:23 +00:00
Bug fix in ExportSalesInvoice and converted more code over to repository and service pattern
This commit is contained in:
@@ -3,21 +3,22 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace bnhtrade.Core.Logic.Account
|
||||
{
|
||||
public class GetTaxCodeInfo
|
||||
public class GetTaxCodeInfo : UnitOfWorkBase
|
||||
{
|
||||
private Data.Database.Account.ReadTaxCode dbRead;
|
||||
|
||||
public GetTaxCodeInfo()
|
||||
{
|
||||
dbRead = new Data.Database.Account.ReadTaxCode();
|
||||
}
|
||||
|
||||
public List<Model.Account.TaxCodeInfo> GetByTaxCode(List<string> taxCodeList)
|
||||
{
|
||||
return dbRead.GetByTaxCode(taxCodeList);
|
||||
return WithUnitOfWork(uow =>
|
||||
{
|
||||
return uow.AccountTaxRepository.ReadTaxCodeInfo(null, taxCodeList).Values.ToList();
|
||||
});
|
||||
}
|
||||
|
||||
public Model.Account.TaxCodeInfo GetByTaxCode(string taxCode)
|
||||
@@ -48,7 +49,11 @@ namespace bnhtrade.Core.Logic.Account
|
||||
}
|
||||
|
||||
// get db list
|
||||
var dbList = dbRead.GetTaxCodeBySkuNumber(skuNumberList);
|
||||
var dbList = WithUnitOfWork(uow =>
|
||||
{
|
||||
return uow.AccountTaxRepository.GetTaxCodeBySkuNumber(skuNumberList);
|
||||
});
|
||||
|
||||
|
||||
// build dictionary
|
||||
foreach (var item in dbList)
|
||||
|
||||
Reference in New Issue
Block a user