コード例 #1
0
        public ReportingInfoResponse Add(ReportingInfo reportingInfo)
        {
            Console.WriteLine(reportingInfo);

            if (rand.NextDouble() > 0.5)
            {
                return new ReportingInfoResponse {
                           Reporting = reportingInfo, ErrorMessage = new ErrorMessage {
                               Message = "Wrong server dude", Code = 101
                           }
                }
            }
            ;
            else
            {
                return new ReportingInfoResponse {
                           Reporting = reportingInfo
                }
            };
        }

        YearlyReportingInfoReponse IStatisticsReportingSoap.Finalize(YearlyReportingInfo yearlyReportingInfo)
        {
            throw new NotImplementedException();
        }
    }
コード例 #2
0
        public static ReportingInfo RecordToReportingInfo(Record r)
        {
            var reportingInfo = new ReportingInfo();

            reportingInfo.ApprovalReportingCaptiaIdLink = r.Permission;
            reportingInfo.Species                    = map(r.Species, SpeciesStringToEnum);
            reportingInfo.SpeciesOther               = r.SpeciesOther;
            reportingInfo.NoOfAnimals                = r.Number;
            reportingInfo.Reuse                      = map(r.Reuse, ReuseStringToEnum);
            reportingInfo.PlaceOfBirth               = map(r.PlaceOfBirth, PlaceOfBirthStringToEnum);
            reportingInfo.NHPSource                  = map(r.NHPSource, NHPSourceStringToEnum);
            reportingInfo.NHPGeneration              = map(r.NHPGeneration, NHPGenerationStringToEnum);
            reportingInfo.GeneticStatus              = map(r.GeneticStatus, GeneticStatusStringToEnum);
            reportingInfo.CreationOfNewGL            = map(r.CreationOfGeneticLine, CreationOfGeneticLineStringToEnum);
            reportingInfo.Purpose                    = map(r.Purpose, PurposeStringToEnum);
            reportingInfo.PurposeOther               = r.PurposeOther;
            reportingInfo.TestingByLegislation       = map(r.TestingByLegislation, TestingByLegislationStringToEnum);
            reportingInfo.TestingByLegislationOther  = r.TestingByLegislationOther;
            reportingInfo.LegislativeRequirements    = map(r.LegislativeRequirements, LegislativeRequirementsStringToEnum);
            reportingInfo.Severity                   = map(r.Severity, SeverityStringToEnum);
            reportingInfo.CustomSeverity             = r.CustomSeverity;
            reportingInfo.Comments1                  = r.Comments1;
            reportingInfo.Comments2                  = r.Comments2;
            reportingInfo.ReportingYear              = r.Year;
            reportingInfo.ApprovalUnitReportingLinks = new ApprovalUnitReportingLink[] { };
            return(reportingInfo);
        }