示例#1
0
 public static Source GetSource(int sourceId)
 {            
     try
     {
         SourceDAO sourceDAO = new SourceDAO();
         return sourceDAO.GetSource(sourceId);                
     }
     catch (ApplicationException)
     {
         throw;
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.BusinessGetSourceException, ex);
     }
 }                
示例#2
0
 public static void UpdateSource(Source source)
 {            
     try
     {
         SourceDAO sourceDAO = new SourceDAO();
         sourceDAO.UpdateSource(source);
     }
     catch (ApplicationException)
     {
         throw;
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.BusinessUpdateSourceException, ex);
     }
 }        
示例#3
0
 public static SourceCollection GetSourceList(SourceColumns orderBy, string orderDirection)
 {            
     try
     {
         SourceDAO sourceDAO = new SourceDAO();
         return sourceDAO.GetSourceList(orderBy, orderDirection);
     }
     catch (ApplicationException)
     {
         throw;
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.BusinessGetSourceListException, ex);
     }
 }