before adding COA packages
This commit is contained in:
@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyName>COA.EnterpriseServices.Creditors</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\COA.EnterpriseServices.DataAccess\COA.EnterpriseServices.DataAccess.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
27
COA.EnterpriseServices.Creditors/CreditorController.cs
Normal file
27
COA.EnterpriseServices.Creditors/CreditorController.cs
Normal file
@ -0,0 +1,27 @@
|
||||
namespace COA.EnterpriseServices.Creditors
|
||||
{
|
||||
public class CreditorController
|
||||
{
|
||||
private readonly CreditorLibrary creditorLibrary;
|
||||
|
||||
public CreditorController(CreditorLibrary creditorLibrary)
|
||||
{
|
||||
this.creditorLibrary = creditorLibrary;
|
||||
}
|
||||
|
||||
public string GetCreditorStatus(int creditorId)
|
||||
{
|
||||
return creditorLibrary.GetCreditorStatus(creditorId);
|
||||
}
|
||||
|
||||
public bool SetCreditorStatus(int creditorId, string status)
|
||||
{
|
||||
return creditorLibrary.SetCreditorStatus(creditorId, status);
|
||||
}
|
||||
|
||||
public void AddOfferResponse()
|
||||
{
|
||||
creditorLibrary.AddOfferResponse();
|
||||
}
|
||||
}
|
||||
}
|
33
COA.EnterpriseServices.Creditors/CreditorLibrary.cs
Normal file
33
COA.EnterpriseServices.Creditors/CreditorLibrary.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using COA.EnterpriseServices.DataAccess.Helpers;
|
||||
|
||||
namespace COA.EnterpriseServices.Creditors
|
||||
{
|
||||
public class CreditorLibrary
|
||||
{
|
||||
private readonly CreditorHelper creditorHelper;
|
||||
|
||||
public CreditorLibrary(CreditorHelper creditorHelper)
|
||||
{
|
||||
this.creditorHelper = creditorHelper;
|
||||
}
|
||||
|
||||
public string GetCreditorStatus(int creditorId)
|
||||
{
|
||||
var creditor = creditorHelper.GetCreditor(creditorId);
|
||||
|
||||
return creditor.Status;
|
||||
}
|
||||
|
||||
public bool SetCreditorStatus(int creditorId, string status)
|
||||
{
|
||||
return creditorHelper.SetCreditorStatus(creditorId, status);
|
||||
}
|
||||
|
||||
public void AddOfferResponse()
|
||||
{
|
||||
// just a stub until we add actual DataObjects
|
||||
|
||||
creditorHelper.SetOriginalCreditorAsPrimary(1);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user