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); } }
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); } }
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); } }
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); } }
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); } }