示例#1
0
 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);
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
 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);
     }
 }
示例#4
0
 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);
     }
 }
示例#5
0
 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);
     }
 }
示例#6
0
 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);
     }
 }
示例#7
0
 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);
     }
 }
示例#8
0
 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);
     }
 }