...
This commit is contained in:
@@ -9,17 +9,19 @@ namespace Back.Services
|
||||
public class servInvoicePayment
|
||||
{
|
||||
private readonly IAsyncRepository<InvoicePayment> _Repo;
|
||||
public servInvoicePayment(IAsyncRepository<InvoicePayment> Repo)
|
||||
private readonly IAsyncRepository<Coding> _CodingRepo;
|
||||
public servInvoicePayment(IAsyncRepository<InvoicePayment> Repo, IAsyncRepository<Coding> CodingRepo)
|
||||
{
|
||||
_Repo = Repo;
|
||||
_CodingRepo = CodingRepo;
|
||||
}
|
||||
public async Task<bool> Add(InvoicePayment item)
|
||||
public async Task<InvoicePayment> Add(InvoicePayment item)
|
||||
{
|
||||
return await _Repo.AddBoolResultAsync(item);
|
||||
return await _Repo.AddAsync(item);
|
||||
}
|
||||
public async Task<bool> Update(InvoicePayment item)
|
||||
public async Task<InvoicePayment> Update(InvoicePayment item)
|
||||
{
|
||||
return await _Repo.UpdateAsync(item);
|
||||
return await _Repo.UpdateByObjAsync(item);
|
||||
}
|
||||
public async Task<bool> Delete(InvoicePayment item)
|
||||
{
|
||||
@@ -40,6 +42,15 @@ namespace Back.Services
|
||||
{
|
||||
return await _Repo.Get(w => w.InvoiceID == invoiceID && w.ID == ID && w.invoice.CompanyID == companyID).FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
public async Task<List<IdName<string>>> GetPaymentMethods()
|
||||
{
|
||||
return await _CodingRepo.Get(w => w.FildID == 71)
|
||||
.Select(s=>new IdName<string>
|
||||
{
|
||||
ID=s.Code,Title=s.Title
|
||||
}).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user