private void Button_Click_3(object sender, RoutedEventArgs e) { var SAuthor = new Service1Author(); SAuthor.DeleteAuthor(Convert.ToInt32(textBox0.Text)); dataGrid1.ItemsSource = new ObservableCollection <Object>(SAuthor.ShowAuthors().Select(x => new { x.ID_Author, x.Surname, x.Name, x.SecondName }).OrderBy(p => p.Name)); }
private void Button_Click_1(object sender, RoutedEventArgs e) { var SAuthor = new Service1Author(); SAuthor.InsertAuthor(textBox1.Text, textBox2.Text, textBox3.Text); dataGrid1.ItemsSource = new ObservableCollection <Object>(SAuthor.ShowAuthors().Select(x => new { x.ID_Author, x.Surname, x.Name, x.SecondName }).OrderBy(p => p.Name)); }