Exemplo n.º 1
0
 private string _FindException(OctopusBookingExceptionsEnum exceptionId)
 {
     string returned = String.Empty;
     switch(exceptionId)
     {
         case OctopusBookingExceptionsEnum.NameIsEmpty:
             returned = "OctopusBookingExceptionsNameIsEmpty.Text";
             break;
         case OctopusBookingExceptionsEnum.CreditAccountIsEmpty:
             returned = "OctopusBookingExceptionsCreditAccountIsEmpty.Text";
             break;
         case OctopusBookingExceptionsEnum.DebitAccountIsEmpty:
             returned = "OctopusBookingExceptionsDebitAccountIsEmpty.Text";
             break;
         case OctopusBookingExceptionsEnum.DebitAndCreditAccountAreIdentical:
             returned = "OctopusBookingExceptionDebitAndCreditAccountAreIdentical.Text";
             break;
         case OctopusBookingExceptionsEnum.BookingIsEmpty:
             returned = "BookingIsEmpty.Text";
             break;
     }
     return returned;
 }
Exemplo n.º 2
0
 public OctopusBookingException(OctopusBookingExceptionsEnum exceptionCode)
 {
     _code = _FindException(exceptionCode);
 }