Ejemplo n.º 1
0
 public BusinessObjects.Models.ResultsEnum insertAllocateCounterService(List <int> lstService, int counterId, int bankId)
 {
     try
     {
         DataAccessLayer.DALAllocateCounterService.DALAllocateCounterService dALAllocateCounterService = new DataAccessLayer.DALAllocateCounterService.DALAllocateCounterService();
         using (TransactionScope scope = new TransactionScope())
         {
             foreach (int serviceId in lstService)
             {
                 BusinessObjects.Models.ResultsEnum insertCheck = dALAllocateCounterService.insertAllocateCounterService(serviceId, counterId, bankId);
                 if (insertCheck == BusinessObjects.Models.ResultsEnum.notInserted)
                 {
                     return(BusinessObjects.Models.ResultsEnum.notInserted);
                 }
             }
             scope.Complete();
         }
         return(BusinessObjects.Models.ResultsEnum.inserted);
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(BusinessObjects.Models.ResultsEnum.notInserted);
     }
 }
Ejemplo n.º 2
0
 public BusinessObjects.Models.ResultsEnum deleteAllocateCounterService(int allocateId, int counterId, int bankId)
 {
     try
     {
         DataAccessLayer.DALAllocateCounterService.DALAllocateCounterService dALAllocateCounterService = new DataAccessLayer.DALAllocateCounterService.DALAllocateCounterService();
         return(dALAllocateCounterService.deleteAllocateCounterService(allocateId, counterId, bankId));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(BusinessObjects.Models.ResultsEnum.notDeleted);
     }
 }
Ejemplo n.º 3
0
 public BusinessObjects.Models.sqlResultsEnum deleteAllocateCounterService(int allocateId, int counterId, int bankId)
 {
     try
     {
         DataAccessLayer.DALAllocateCounterService.DALAllocateCounterService dALAllocateCounterService = new DataAccessLayer.DALAllocateCounterService.DALAllocateCounterService();
         return(dALAllocateCounterService.deleteAllocateCounterService(allocateId, counterId, bankId));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(BusinessObjects.Models.sqlResultsEnum.failed);
     }
 }
Ejemplo n.º 4
0
 public List <BusinessObjects.Models.AllocateCounterService> selectAllocateCounterService(int counterId, int bankId)
 {
     try
     {
         DataAccessLayer.DALAllocateCounterService.DALAllocateCounterService dALAllocateCounterService = new DataAccessLayer.DALAllocateCounterService.DALAllocateCounterService();
         return(dALAllocateCounterService.selectAllocateCounterService(counterId, bankId));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(null);
     }
 }
Ejemplo n.º 5
0
 public List <BusinessObjects.Models.AllocateCounterService> selectAllocateCounterService(int counterId, int bankId)
 {
     try
     {
         DataAccessLayer.DALAllocateCounterService.DALAllocateCounterService dALAllocateCounterService = new DataAccessLayer.DALAllocateCounterService.DALAllocateCounterService();
         return(dALAllocateCounterService.selectAllocateCounterService(counterId, bankId));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(null);
     }
 }