Esempio n. 1
0
 public static ServiceException BuildNoItemException(NoLineItemsFoundException ex)
 {
     if (String.IsNullOrEmpty(ex.OrderNumber))
     {
         var message = String.Format("{0} {1:mm-dd-yyyy} to {2:mm-dd-yyyy}", ex.Message, ex.StartDate, ex.EndDate);
         return new ServiceException {Severity = "4", Code = 0, Message = message};
     }
     else
     {
         var message = String.Format("{0} {1}", ex.Message, ex.OrderNumber);
         return new ServiceException {Severity = "4", Code = 0, Message = message};
     }
 }
Esempio n. 2
0
 public static ServiceException BuildNoItemException(NoLineItemsFoundException ex)
 {
     if (String.IsNullOrEmpty(ex.OrderNumber))
     {
         var message = String.Format("{0} {1:mm-dd-yyyy} to {2:mm-dd-yyyy}", ex.Message, ex.StartDate, ex.EndDate);
         return(new ServiceException {
             Severity = "4", Code = 0, Message = message
         });
     }
     else
     {
         var message = String.Format("{0} {1}", ex.Message, ex.OrderNumber);
         return(new ServiceException {
             Severity = "4", Code = 0, Message = message
         });
     }
 }