2020-10-15 11:07:32 +00:00
|
|
|
|
using COA.EnterpriseServices.DataAccess.Helpers;
|
|
|
|
|
|
2020-10-15 12:48:11 +00:00
|
|
|
|
namespace COA.EnterpriseServices.Creditors
|
2020-10-15 11:07:32 +00:00
|
|
|
|
{
|
2020-10-15 12:48:11 +00:00
|
|
|
|
public class CreditorLibrary
|
2020-10-15 11:07:32 +00:00
|
|
|
|
{
|
|
|
|
|
private readonly CreditorHelper creditorHelper;
|
|
|
|
|
|
2020-10-15 12:48:11 +00:00
|
|
|
|
public CreditorLibrary(CreditorHelper creditorHelper)
|
2020-10-15 11:07:32 +00:00
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
}
|
2020-10-15 12:08:02 +00:00
|
|
|
|
|
|
|
|
|
public void AddOfferResponse()
|
|
|
|
|
{
|
|
|
|
|
// just a stub until we add actual DataObjects
|
|
|
|
|
|
|
|
|
|
creditorHelper.SetOriginalCreditorAsPrimary(1);
|
|
|
|
|
}
|
2020-10-15 11:07:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|