public override void GetValuesFromNavigationParameters(NavigationContext navigationContext) { IHandlerEntryEntityWithAdditionalData parmdata = navigationContext.Parameters["entity"] as IHandlerEntryEntityWithAdditionalData; if (parmdata != null) { data = parmdata; } }
private async Task AddDataForCertificate(List <ICertficateDetail> certs, IChallengeResult result) { if (!result.Print) { return; } if (string.IsNullOrEmpty(result.EntryNumber)) { return; } if (result.ShowId <= 0) { return; } var allentries = await _handlerEntryService.GetHandlerEntryListAsync <HandlerEntryEntityWithAdditionalData>(); var entries = allentries.Where(e => e.ShowId == result.ShowId && e.EntryNumber == result.EntryNumber).ToList(); if (entries.Count == 1) { IHandlerEntryEntityWithAdditionalData entryData = entries.First(); certs.Add(new CertificateDetail() { RegionName = ReportConstants.REGION_NAME, DateAsString = ReportConstants.SHOWDATE_AS_STRING, SecretaryName = ReportConstants.SECRETARY, VenueName = ReportConstants.VENUE_NAME, ClubName = ReportConstants.CLUB_NAME, ShowName = entryData.ShowName, DateOfBirth = entryData.DOB.ToString("yyyy-MM-dd"), ChallengeName = entryData.EnteredClassName, BreedName = entryData.DogBreed, DogName = entryData.HandlerDisplayName, EntryNumber = entryData.EntryNumber, JudgeName = entryData.JudgeName, OwnerName = "", RegistrationNumber = entryData.DogRegistrationNumber, SexName = entryData.SexName }); } ; }