private void view_MouseDoubleClick(object sender, MouseButtonEventArgs e) { MessageBox.Show((view.SelectedItem as Ads).Name); ad = (view.SelectedItem as Ads); Detailedinformation DI = new Detailedinformation(ad); DI.ShowDialog(); }
private void AddAdvert(object sender, RoutedEventArgs e) { if (Title.Text == "" || ComboBox1.SelectedItem.ToString() == "" || _price.Text == "" || Text.Text == "") { MessageBox.Show("Не все поля заполненны!!!"); return; } else { Ad = new Ads(Title.Text, ComboBox1.SelectedItem.ToString(), int.Parse(_price.Text), Text.Text, image1, image2, image3, new DateTime(), user); } Ad.City = this.City; this.Close(); }
public Detailedinformation(Ads AD) { InitializeComponent(); Ad = AD; List1.Items.Add(Ad.image1); List1.Items.Add(Ad.image2); List1.Items.Add(Ad.image3); grid.DataContext = Ad; List1.SelectedIndex = 0; }