protected override void OnNavigatedTo(NavigationEventArgs e) { string oid = "", h = ""; if (NavigationContext.QueryString.TryGetValue("oid", out oid) && NavigationContext.QueryString.TryGetValue("h", out h)) { int offerID = int.Parse(oid); bool humanYn = bool.Parse(h); AppSettings.LogThis("Offer id = " + offerID); this.currentOffer = App.DbViewModel.GetOffer(offerID); this.pageTitle.Text = this.currentOffer.Title; this.txtCategory.Text = this.currentOffer.CategoryTitle; this.txtDate.Text = AppSettings.DoLongDate(this.currentOffer.PublishDate); this.txtFreelanceLabel.Text = AppResources.offer_FreelanceYn; this.txtFreelance.Text = ((this.currentOffer.FreelanceYn) ? AppResources.yes : AppResources.no); this.txtNegativLabel.Text = ((humanYn) ? AppResources.offer_Human_Negativ : AppResources.offer_Company_Negativ); RichTextBoxExtensions.SetLinkedText(this.rtbNegativ, AppSettings.Hyperlinkify(this.currentOffer.Negativism)); this.txtPositivLabel.Text = ((humanYn) ? AppResources.offer_Human_Positiv : AppResources.offer_Company_Positiv); RichTextBoxExtensions.SetLinkedText(this.rtbPositiv, AppSettings.Hyperlinkify(this.currentOffer.Positivism)); } else NavigationService.Navigate(new Uri("/Views/Newest.xaml", UriKind.Relative)); }
protected override void OnNavigatedTo(NavigationEventArgs e) { string oid = ""; if (NavigationContext.QueryString.TryGetValue("oid", out oid)) this.currentOffer = App.DbViewModel.GetOffer(int.Parse(oid)); }