Esempio n. 1
0
        private string _FindException(OpenCbsBookingExceptionsEnum exceptionId)
		{
			string returned = String.Empty;
			switch(exceptionId)
			{
				case OpenCbsBookingExceptionsEnum.NameIsEmpty:
					returned = "OpenCbsBookingExceptionsNameIsEmpty.Text";
                    break;
                case OpenCbsBookingExceptionsEnum.CreditAccountIsEmpty:
                    returned = "OpenCbsBookingExceptionsCreditAccountIsEmpty.Text";
                    break;
                case OpenCbsBookingExceptionsEnum.DebitAccountIsEmpty:
                    returned = "OpenCbsBookingExceptionsDebitAccountIsEmpty.Text";
                    break;   
                case OpenCbsBookingExceptionsEnum.DebitAndCreditAccountAreIdentical:
                    returned = "OpenCbsBookingExceptionDebitAndCreditAccountAreIdentical.Text";
                    break;
                case OpenCbsBookingExceptionsEnum.BookingIsEmpty:
                    returned = "BookingIsEmpty.Text";
                    break;
                case OpenCbsBookingExceptionsEnum.NotDeletableClosure:
                    returned = "OpenCbsNotDeletableClosure.Text";
                    break;
			}
			return returned;
		}
        private string _FindException(OpenCbsBookingExceptionsEnum exceptionId)
        {
            string returned = String.Empty;

            switch (exceptionId)
            {
            case OpenCbsBookingExceptionsEnum.NameIsEmpty:
                returned = "OpenCbsBookingExceptionsNameIsEmpty.Text";
                break;

            case OpenCbsBookingExceptionsEnum.CreditAccountIsEmpty:
                returned = "OpenCbsBookingExceptionsCreditAccountIsEmpty.Text";
                break;

            case OpenCbsBookingExceptionsEnum.DebitAccountIsEmpty:
                returned = "OpenCbsBookingExceptionsDebitAccountIsEmpty.Text";
                break;

            case OpenCbsBookingExceptionsEnum.DebitAndCreditAccountAreIdentical:
                returned = "OpenCbsBookingExceptionDebitAndCreditAccountAreIdentical.Text";
                break;

            case OpenCbsBookingExceptionsEnum.BookingIsEmpty:
                returned = "BookingIsEmpty.Text";
                break;

            case OpenCbsBookingExceptionsEnum.NotDeletableClosure:
                returned = "OpenCbsNotDeletableClosure.Text";
                break;
            }
            return(returned);
        }
Esempio n. 3
0
        public OpenCbsBookingException(OpenCbsBookingExceptionsEnum exceptionCode)
		{
			_code = _FindException(exceptionCode);
		}
 public OpenCbsBookingException(OpenCbsBookingExceptionsEnum exceptionCode)
 {
     _code = _FindException(exceptionCode);
 }