/// <summary>
 /// Retrieve a list of branches as well as the number of cards they have according to the load batch status.
 /// </summary>
 /// <param name="issuerId"></param>
 /// <param name="userId"></param>
 /// <param name="userRoleId"></param>
 /// <param name="loadBatchStatusId">May be null to fetch cards in any status</param>
 /// <param name="auditUserId"></param>
 /// <param name="auditWorkstation"></param>
 /// <returns></returns>
 internal Response <List <BranchLoadCardCountResult> > GetBranchesLoadCardCount(int issuerId, long userId, UserRole userRole, Veneka.Indigo.CardManagement.LoadCardStatus?loadCardStatus, long auditUserId, string auditWorkstation)
 {
     try
     {
         return(new Response <List <BranchLoadCardCountResult> >(_branchService.GetBranchesLoadCardCount(issuerId, userId, (int)userRole, (int?)loadCardStatus, auditUserId, auditWorkstation),
                                                                 ResponseType.SUCCESSFUL,
                                                                 "",
                                                                 ""));
     }
     catch (Exception ex)
     {
         log.Error(ex);
         return(new Response <List <BranchLoadCardCountResult> >(null,
                                                                 ResponseType.ERROR,
                                                                 "Error processing request, please try again.",
                                                                 log.IsDebugEnabled || log.IsTraceEnabled ? ex.Message : ""));
     }
 }