public BusinessObjects.Models.ResultsEnum deleteCounterById(int counterId, int bankId, int branchId) { try { BusinessObjects.Models.ResultsEnum checkDelete; using (TransactionScope scope = new TransactionScope()) { DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter(); checkDelete = dALCounter.deleteAllocateCounterServiceByCounterId(counterId, bankId); if (checkDelete == BusinessObjects.Models.ResultsEnum.deleted) { checkDelete = dALCounter.deleteCounterById(counterId, bankId, branchId); if (checkDelete == BusinessObjects.Models.ResultsEnum.deleted) { scope.Complete(); } } } return(checkDelete); } catch (Exception ex) { ExceptionsWriter.saveExceptionToLogFile(ex); return(BusinessObjects.Models.ResultsEnum.notDeleted); } }
public BusinessObjects.Models.sqlResultsEnum deleteCounterById(int counterId, int bankId, int branchId) { try { BusinessObjects.Models.sqlResultsEnum checkDelete; using (TransactionScope scope = new TransactionScope()) { DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter(); checkDelete = dALCounter.deleteAllocateCounterServiceByCounterId(counterId, bankId); if (checkDelete == BusinessObjects.Models.sqlResultsEnum.success) { checkDelete = dALCounter.deleteCounterById(counterId, bankId, branchId); if (checkDelete == BusinessObjects.Models.sqlResultsEnum.success) { scope.Complete(); } } } return(checkDelete); } catch (Exception ex) { ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error); return(BusinessObjects.Models.sqlResultsEnum.failed); } }
public BusinessObjects.Models.ResultsEnum updateCounter(BusinessObjects.Models.Counter counter, int bankId) { try { DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter(); return(dALCounter.updateCounter(counter, bankId)); } catch (Exception ex) { ExceptionsWriter.saveExceptionToLogFile(ex); return(BusinessObjects.Models.ResultsEnum.notUpdated); } }
public List <BusinessObjects.Models.Counter> selectCountersByBranchId(int pBranchId, int pBankId) { try { DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter(); return(dALCounter.selectCountersByBranchId(pBranchId, pBankId)); } catch (Exception ex) { ExceptionsWriter.saveExceptionToLogFile(ex); return(null); } }
public BusinessObjects.Models.Counter selectCounterById(int counterId, int bankId) { try { DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter(); return(dALCounter.selectCounterById(counterId, bankId)); } catch (Exception ex) { ExceptionsWriter.saveExceptionToLogFile(ex); return(null); } }
public BusinessObjects.Models.ResultsEnum updateCounter(BusinessObjects.Models.Counter counter, int bankId) { try { DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter(); return(dALCounter.updateCounter(counter, bankId)); } catch (Exception ex) { ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error); return(BusinessObjects.Models.ResultsEnum.notUpdated); } }
public List <BusinessObjects.Models.Counter> selectCountersByBranchId(int pBranchId, int pBankId) { try { DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter(); return(dALCounter.selectCountersByBranchId(pBranchId, pBankId)); } catch (Exception ex) { ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error); return(null); } }
public BusinessObjects.Models.Counter selectCounterById(int counterId, int bankId) { try { DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter(); return(dALCounter.selectCounterById(counterId, bankId)); } catch (Exception ex) { ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error); return(null); } }