progress
This commit is contained in:
parent
d67c7546ab
commit
82245a693f
@ -25,8 +25,13 @@ namespace COA.EnterpriseServices.Creditors
|
||||
|
||||
public void AddOfferResponse(OfferResponse response)
|
||||
{
|
||||
// just a stub until we add actual DataObjects
|
||||
var creditor = creditorHelper.GetCreditor(response.CreditorId);
|
||||
|
||||
// manipulate creditor object directly
|
||||
|
||||
creditorHelper.UpdateCreditor(creditor);
|
||||
|
||||
// or have individual methods
|
||||
creditorHelper.SetOriginalCreditorAsPrimary(response.CreditorId);
|
||||
}
|
||||
}
|
||||
|
@ -13,5 +13,6 @@ namespace COA.EnterpriseServices.DataAccess.Entities
|
||||
public int CurrentCreditorProfileId { get; set; }
|
||||
public int OriginalCreditorProfileId { get; set; }
|
||||
public string AccountNumber { get; set; }
|
||||
public string ReferenceNumber { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace COA.EnterpriseServices.DataAccess.Helpers
|
||||
return creditorDataAccess.Add(creditorEntity);
|
||||
}
|
||||
|
||||
public bool UpdateCreditor(Creditor creditor)
|
||||
public bool UpdateCreditor(Creditors.Creditor creditor)
|
||||
{
|
||||
var creditorEntity = mapper.Map<Creditor>(creditor);
|
||||
|
||||
@ -52,6 +52,15 @@ namespace COA.EnterpriseServices.DataAccess.Helpers
|
||||
{
|
||||
var creditor = creditorDataAccess.Get(creditorId);
|
||||
|
||||
creditor.ReferenceNumber = string.Empty;
|
||||
|
||||
creditorDataAccess.Update(creditor);
|
||||
}
|
||||
|
||||
public void ClearCreditorReferenceNumber(int creditorId)
|
||||
{
|
||||
var creditor = creditorDataAccess.Get(creditorId);
|
||||
|
||||
creditor.CurrentCreditorProfileId = creditor.OriginalCreditorProfileId;
|
||||
|
||||
creditorDataAccess.Update(creditor);
|
||||
|
@ -14,6 +14,8 @@ namespace COA.EnterpriseServices.DataAccess
|
||||
|
||||
CreateMap<Entities.Client, Client.Client>();
|
||||
|
||||
CreateMap<Entities.SettlementAttempt, SettlementAttempt>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Domain => EF
|
||||
@ -23,6 +25,8 @@ namespace COA.EnterpriseServices.DataAccess
|
||||
|
||||
CreateMap<Client.Client, Entities.Client>();
|
||||
|
||||
CreateMap<SettlementAttempt, Entities.SettlementAttempt>();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user