예제 #1
0
 public IActionResult GetAllFinOpsByOrganizationId(int orgId)
 {
     if (orgId <= 0)
     {
         BadRequest();
     }
     return(Ok(_service.GetAllFinOpsByOrgId(orgId)));
 }
예제 #2
0
 private void CheckInFinOps(List <TargetViewModel> targets)
 {
     try
     {
         var finOps = _finOpService.GetAllFinOpsByOrgId(targets[0].OrganizationId).ToList();
         foreach (var target in targets)
         {
             if (finOps.Exists(f => f.TargetId == target.TargetId))
             {
                 target.IsDeletable = false;
             }
         }
     }
     catch (Exception e)
     {
         throw new BusinessLogicException(ErrorMessages.CantFindDataById, e);
     }
 }