|
09.10.2013, 18:58 | #1 |
Участник
|
Похоже задача решается просто.
Покритикуйте. X++: /// <summary> /// Converts a <c>CurrentOperationsTax</c> enumeration value to an <c>OperationsTax</c> enumeration value. /// </summary> /// <param name="_currentOperationsTax"> /// The <c>CurrentOperationsTax</c> enumeration value to convert. /// </param> /// <returns> /// A corresponding <c>OperationsTax</c> enumeration value. /// </returns> static OperationsTax operationsTax(CurrentOperationsTax _currentOperationsTax) { OperationsTax operationsTax; ; switch(_currentOperationsTax) { case CurrentOperationsTax::Current : operationsTax = OperationsTax::Current; break; case CurrentOperationsTax::Operations : operationsTax = OperationsTax::Operations; break; case CurrentOperationsTax::Tax : operationsTax = OperationsTax::Tax; break; //SKS, 09.10.2013--> case CurrentOperationsTax::XXX_WarehouseCur ://предварительно создал новый элемент для BaseEnum operationsTax = OperationsTax::WarehouseCur_RU; break; //<-- default : break; } return operationsTax; } |
|