private void ButtonInf_Click(object sender, RoutedEventArgs e) { InfAboutCharity infAboutCharity = new InfAboutCharity(); infAboutCharity.Owner = this; infAboutCharity.Title.Text = InfAboutFond.Text; infAboutCharity.Opisanie.Text = txt; infAboutCharity.ShowDialog(); }
private void ButtonInfSponsor_Click(object sender, RoutedEventArgs e) { try { vs = pairs.Keys.ToList(); int a = vs[CharityOrg.SelectedIndex]; //SponsorInformation sponsorInformation = new SponsorInformation(); //sponsorInformation.Owner = this; //sponsorInformation.ShowDialog(); InfAboutCharity infAboutCharity = new InfAboutCharity(); infAboutCharity.Owner = this; infAboutCharity.Title.Text = CharityOrg.SelectedItem.ToString(); infAboutCharity.Opisanie.Text = context.Charity.Where(i => i.CharityId == a).Select(i => i.CharityDescription).ToList()[0].ToString(); infAboutCharity.ShowDialog(); } catch (ArgumentOutOfRangeException) { MessageBox.Show("Выбирите благотворительную организацию из списка"); } }