Beispiel #1
0
        public void UpdateClientTPLStatus(int clientId, TplStatus status, int internalUserId)
        {
            var clientTpl = _databaseContext.Clients.Include(c => c.ClientDetails).ThenInclude(t => t.TPLDetails).Where(x => x.ClientId == clientId).FirstOrDefault().ClientDetails.TPLDetails;

            if (clientTpl == null)
            {
                _databaseContext.Clients.Include(c => c.ClientDetails).ThenInclude(t => t.TPLDetails).Where(x => x.ClientId == clientId).FirstOrDefault().ClientDetails.TPLDetails = new Entities.TPLDetails()
                {
                    TPLTermId = 0,
                    Status    = status
                };
            }
            else
            {
                clientTpl.Status = status;
            }
            _databaseContext.SaveChanges();
        }
Beispiel #2
0
 public void UpdateClientTPLStatus(int clientId, TplStatus status, int internalUserId)
 {
     _clientDal.UpdateClientTPLStatus(clientId, status, internalUserId);
 }
 public IActionResult UpdateClientLiabilityStatus([FromRoute] int clientId, [FromBody] TplStatus status)
 {
     _clientService.UpdateClientTPLStatus(clientId, status, User.GetInternalUserId());
     return(Ok());
 }