public static ImportQueueFilter FromParameters(ImportParameters Parameters)
 {
     return new ImportQueueFilter()
     {
         ImportQueueId = Parameters.ImportQueueId
     };
 }
 public static ImportQueue FromParameters(ImportParameters parameters)
 {
     return new ImportQueue()
     {
         ProgrammeId = parameters.ProgrammeId.GetValueOrDefault(),
         ModelYear = parameters.ModelYear,
         Gateway = parameters.Gateway,
         DocumentId = parameters.DocumentId,
         FilePath = parameters.UploadFilePath,
         OriginalFileName = parameters.UploadFile.FileName
     };
 }
 public static ImportParameters GetActionSpecificParameters(ImportParameters fromParameters)
 {
     var parameters = new ImportParameters()
     {
         Action = fromParameters.Action
     };
     switch (fromParameters.Action)
     {
         case ImportAction.Upload:
             parameters.UploadFile = fromParameters.UploadFile;
             parameters.CarLine = fromParameters.CarLine;
             parameters.ModelYear = fromParameters.ModelYear;
             parameters.Gateway = fromParameters.Gateway;
             parameters.DocumentId = fromParameters.DocumentId;
             break;
         case ImportAction.DeleteImport:
             parameters.ImportQueueId = fromParameters.ImportQueueId;
             break;
         case ImportAction.NotSet:
             break;
         case ImportAction.MapMissingMarket:
             break;
         case ImportAction.AddMissingDerivative:
             break;
         case ImportAction.MapMissingDerivative:
             break;
         case ImportAction.AddMissingFeature:
             break;
         case ImportAction.MapMissingFeature:
             break;
         case ImportAction.AddMissingTrim:
             break;
         case ImportAction.MapMissingTrim:
             break;
         case ImportAction.IgnoreException:
             break;
         case ImportAction.AddSpecialFeature:
             break;
         case ImportAction.Exception:
             break;
         case ImportAction.ImportQueue:
             break;
         case ImportAction.ImportQueueItem:
             break;
         case ImportAction.MapOxoDerivative:
             break;
         case ImportAction.IgnoreAll:
             break;
         case ImportAction.MapOxoTrim:
             break;
         case ImportAction.MapOxoFeature:
             break;
         case ImportAction.ProcessTakeRateData:
             break;
         case ImportAction.Summary:
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
     return parameters;
 }
        public static ImportParameters GetActionSpecificParameters(ImportParameters fromParameters)
        {
            var parameters = new ImportParameters()
            {
                Action = fromParameters.Action
            };

            switch (fromParameters.Action)
            {
            case ImportAction.Upload:
                parameters.UploadFile = fromParameters.UploadFile;
                parameters.CarLine    = fromParameters.CarLine;
                parameters.ModelYear  = fromParameters.ModelYear;
                parameters.Gateway    = fromParameters.Gateway;
                parameters.DocumentId = fromParameters.DocumentId;
                break;

            case ImportAction.DeleteImport:
                parameters.ImportQueueId = fromParameters.ImportQueueId;
                break;

            case ImportAction.NotSet:
                break;

            case ImportAction.MapMissingMarket:
                break;

            case ImportAction.AddMissingDerivative:
                break;

            case ImportAction.MapMissingDerivative:
                break;

            case ImportAction.AddMissingFeature:
                break;

            case ImportAction.MapMissingFeature:
                break;

            case ImportAction.AddMissingTrim:
                break;

            case ImportAction.MapMissingTrim:
                break;

            case ImportAction.IgnoreException:
                break;

            case ImportAction.AddSpecialFeature:
                break;

            case ImportAction.Exception:
                break;

            case ImportAction.ImportQueue:
                break;

            case ImportAction.ImportQueueItem:
                break;

            case ImportAction.MapOxoDerivative:
                break;

            case ImportAction.IgnoreAll:
                break;

            case ImportAction.MapOxoTrim:
                break;

            case ImportAction.MapOxoFeature:
                break;

            case ImportAction.ProcessTakeRateData:
                break;

            case ImportAction.Summary:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
            return(parameters);
        }