using System.Collections.Generic;
NSYMaterialRejectionRePickingMode = 2,
NSYMaterialThicknessTolerance = 3,
NWSAssemblyShowBottomArea = 6,
NWSAssemblyStartAllowed = 7,
NWSChargeNumberMandatoryOnComplete = 8,
NWSChargeNumberMandatoryOnStart = 9,
NWSCuttingUnbornRemnantAllowed = 10,
NWSEndProductUpdatedInWorkPhase = 11,
NWSPackageSaveToHistoryTable = 12,
NWSPackingMaterialInNxinventory = 13,
NWSPackingMaterialMode = 14,
NWSPackingRequiredForCompletion = 15,
NWSPickingMandatory = 16,
NWSPickingUseStockItemSelection = 17,
NWSPurchaseItemStockItemAddingAllowed = 18,
NWSStorageLocationLimitByType = 19,
NWSStorageLocationLimitByWorkPlace = 20,
NWSStorageLocationMandatory = 21,
NWSUpcomingWorksVisible = 22,
NWSVerificationWindowType = 23,
public enum PackingRequiredForCompletion {
private static T? GetEnumValueByWorkplaceIDAsync<T>( int workplaceID, ParamName? parName = null ) {
object value = PackingRequiredForCompletion.TrueWithSkipping;
throw new ArgumentException($"Value for parameter '{parName}' is not of type {typeof(T)}");
if( typeof(T) == typeof(bool))
throw new KeyNotFoundException($"Parameter '{parName}' not found in the dictionary");
public static void Main()
var isPackageMaterialInNxinventoryTable = GetEnumValueByWorkplaceIDAsync<bool>( 1, ParamName.NWSPackageSaveToHistoryTable );
Console.WriteLine( isPackageMaterialInNxinventoryTable.ToString() );
var packingRequiredForCompletion = GetEnumValueByWorkplaceIDAsync<PackingRequiredForCompletion>( 2 );
Console.WriteLine( packingRequiredForCompletion.ToString() );