public string Get(int typeIdToSend, int majorVersion, int minorVersion, int servicePack, int buildNumber)
        {
            logData.Info("Get files with report svv filter executing");
            var reportTypeId     = new ExtractReportTypeId();
            var assayTypeRepo    = new ExtractAssayType();
            var extractFileRepo  = new ExtractFile();
            var extractReportSsv = new ExtractReportSSV();

            try
            {
                long Id = 0;
                string returnResponseFile(IEnumerable <ReportFile> temp)
                {
                    var files = new List <FileStructure>();

                    foreach (var t in temp)
                    {
                        files.Add(new FileStructure
                        {
                            AssayName = t.FileName,
                            File      = t
                        });
                    }
                    return(JsonConvert.SerializeObject(files));
                }
                //if assay name is not null
                if (typeIdToSend != -1)
                {
                    Id = assayTypeRepo.GetAssayID(typeIdToSend);
                }

                //if only assay and  major version is given
                if (typeIdToSend != -1 && majorVersion != -1 && minorVersion == -1 && servicePack == -1 && buildNumber == -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMajor(Id, majorVersion);
                    return(returnResponseFile(tempHolder));
                }

                //if only assay andminor version is given

                if (typeIdToSend != -1 && majorVersion == -1 && minorVersion != -1 && servicePack == -1 && buildNumber == -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMinor(Id, minorVersion);
                    return(returnResponseFile(tempHolder));
                }

                //if only assay and service number version is given
                if (typeIdToSend != -1 && majorVersion == -1 && minorVersion == -1 && servicePack != -1 && buildNumber == -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayServicePack(Id, servicePack);
                    return(returnResponseFile(tempHolder));
                }
                //if only assay and build number version is given
                if (typeIdToSend != -1 && majorVersion == -1 && minorVersion == -1 && servicePack == -1 && buildNumber != -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayBuildNumber(Id, buildNumber);
                    return(returnResponseFile(tempHolder));
                }

                //if  assay, major and minor are given
                if (typeIdToSend != -1 && majorVersion != -1 && minorVersion != -1 && servicePack == -1 && buildNumber == -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMajorMinor(Id, majorVersion, minorVersion);
                    return(returnResponseFile(tempHolder));
                }

                // if assay, major and service are given
                if (typeIdToSend != -1 && majorVersion != -1 && minorVersion == -1 && servicePack != -1 && buildNumber == -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMajorService(Id, majorVersion, servicePack);
                    return(returnResponseFile(tempHolder));
                }

                //if assay,  major and build are given
                if (typeIdToSend != -1 && majorVersion != -1 && minorVersion == -1 && servicePack == -1 && buildNumber != -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMajorBuild(Id, majorVersion, buildNumber);
                    return(returnResponseFile(tempHolder));
                }
                //if assay, major minor and service are given
                if (typeIdToSend != -1 && majorVersion != -1 && minorVersion != -1 && servicePack != -1 && buildNumber == -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMajorMinorService(Id, majorVersion, minorVersion, servicePack);
                    return(returnResponseFile(tempHolder));
                }

                //if assay, major minor and build are given
                if (typeIdToSend != -1 && majorVersion != -1 && minorVersion != -1 && servicePack == -1 && buildNumber != -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMajorMinorBuild(Id, majorVersion, minorVersion, buildNumber);
                    return(returnResponseFile(tempHolder));
                }

                // assay, major service build are given
                if (typeIdToSend != -1 && majorVersion != -1 && minorVersion == -1 && servicePack != -1 && buildNumber != -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMajorServiceBuild(Id, majorVersion, servicePack, buildNumber);
                    return(returnResponseFile(tempHolder));
                }

                // assay, minor and service are given
                if (typeIdToSend != -1 && majorVersion == -1 && minorVersion != -1 && servicePack != -1 && buildNumber == -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMinorService(Id, minorVersion, servicePack);
                    return(returnResponseFile(tempHolder));
                }
                // assay, minor and build are given
                if (typeIdToSend != -1 && majorVersion == -1 && minorVersion != -1 && servicePack == -1 && buildNumber != -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMinorBuild(Id, minorVersion, buildNumber);
                    return(returnResponseFile(tempHolder));
                }
                // assay, minor service and build are given
                if (typeIdToSend != -1 && majorVersion == -1 && minorVersion != -1 && servicePack != -1 && buildNumber != -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayMinorServiceBuild(Id, minorVersion, servicePack, buildNumber);
                    return(returnResponseFile(tempHolder));
                }
                // assay, service and build are given
                if (typeIdToSend != -1 && majorVersion == -1 && minorVersion == -1 && servicePack != -1 && buildNumber != -1)
                {
                    var tempHolder = extractFileRepo.GetReportWithAssayServiceBuild(Id, servicePack, buildNumber);
                    return(returnResponseFile(tempHolder));
                }
            }
            catch (Exception e)
            {
            }
            return(null);
        }
        public string Get(string reportType, int majorVersion, int minorVersion, int servicePack, int buildNumber)
        {
            logData.Info("Get files with report svv filter executing");
            var reportTypeId     = new ExtractReportTypeId();
            var extractReportSsv = new ExtractReportSSV();

            try
            {
                long reportId = 0;
                string returnResponseFile(IEnumerable <ReportFile> temp)
                {
                    var files = new List <FileStructure>();

                    foreach (var t in temp)
                    {
                        files.Add(new FileStructure
                        {
                            AssayName = t.FileName,
                            File      = t
                        });
                    }
                    return(JsonConvert.SerializeObject(files));
                }

                if (reportType != "null")
                {
                    reportId = reportTypeId.GetReportTypeId(reportType);
                }
                //if only report and  major version is given
                if (reportType != "null" && majorVersion != -1 && minorVersion == -1 && servicePack == -1 && buildNumber == -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportMajor(reportId, majorVersion);
                    return(returnResponseFile(tempHolder));
                }

                //if only report and minor version is given

                if (reportType != "null" && majorVersion == -1 && minorVersion != -1 && servicePack == -1 && buildNumber == -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportMinor(reportId, minorVersion);
                    return(returnResponseFile(tempHolder));
                }

                //if only report and service number version is given
                if (reportType != "null" && majorVersion == -1 && minorVersion == -1 && servicePack != -1 && buildNumber == -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportServicePack(reportId, servicePack);
                    return(returnResponseFile(tempHolder));
                }
                //if only report and build number version is given
                if (reportType != "null" && majorVersion == -1 && minorVersion == -1 && servicePack == -1 && buildNumber != -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportBuildNumber(reportId, buildNumber);
                    return(returnResponseFile(tempHolder));
                }

                //if  report, major and minor are given
                if (reportType != "null" && majorVersion != -1 && minorVersion != -1 && servicePack == -1 && buildNumber == -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportMajorMinor(reportId, majorVersion, minorVersion);
                    return(returnResponseFile(tempHolder));
                }
                // if report, major and service are given
                if (reportType != "null" && majorVersion != -1 && minorVersion == -1 && servicePack != -1 && buildNumber == -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportMajorService(reportId, majorVersion, servicePack);
                    return(returnResponseFile(tempHolder));
                }

                //if report,  major and build are given
                if (reportType != "null" && majorVersion != -1 && minorVersion == -1 && servicePack == -1 && buildNumber != -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportMajorBuild(reportId, majorVersion, buildNumber);
                    return(returnResponseFile(tempHolder));
                }
                //if report, major minor and service are given
                if (reportType != "null" && majorVersion != -1 && minorVersion != -1 && servicePack != -1 && buildNumber == -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportMajorMinorService(reportId, majorVersion, minorVersion, servicePack);
                    return(returnResponseFile(tempHolder));
                }

                //if report, major minor and build are given
                if (reportType != "null" && majorVersion != -1 && minorVersion != -1 && servicePack == -1 && buildNumber != -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportMajorMinorBuild(reportId, majorVersion, minorVersion, buildNumber);
                    return(returnResponseFile(tempHolder));
                }
                // report, major service build are given
                if (reportType != "null" && majorVersion != -1 && minorVersion == -1 && servicePack != -1 && buildNumber != -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportMajorServiceBuild(reportId, majorVersion, servicePack, buildNumber);
                    return(returnResponseFile(tempHolder));
                }

                // report, minor and service are given
                if (reportType != "null" && majorVersion == -1 && minorVersion != -1 && servicePack != -1 && buildNumber == -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportMinorService(reportId, minorVersion, servicePack);
                    return(returnResponseFile(tempHolder));
                }
                // report, minor and build are given
                if (reportType != "null" && majorVersion == -1 && minorVersion != -1 && servicePack == -1 && buildNumber != -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportMinorBuild(reportId, minorVersion, buildNumber);
                    return(returnResponseFile(tempHolder));
                }
                // report, minor service and build are given
                if (reportType != "null" && majorVersion == -1 && minorVersion != -1 && servicePack != -1 && buildNumber != -1)
                {//GetReportWithMinorServiceBuild
                 // extractFileParamsRepo
                    var tempHolder = extractReportSsv.GetReportWithReportMinorServiceBuild(reportId, minorVersion, servicePack, buildNumber);
                    return(returnResponseFile(tempHolder));
                }
                // report, service and build are given
                if (reportType != "null" && majorVersion == -1 && minorVersion == -1 && servicePack != -1 && buildNumber != -1)
                {
                    var tempHolder = extractReportSsv.GetReportWithReportServiceBuild(reportId, servicePack, buildNumber);
                    return(returnResponseFile(tempHolder));
                }
            }
            catch (Exception e)
            {
            }
            return(null);
        }