private void deleteRowVKR(object sender, RoutedEventArgs e) { Model.Theses itemFocus = thesesGrid.SelectedValue as Model.Theses; itemFocus.DateDeleted = DateTime.Now; db.SaveChanges(); LoadTheses(); FindCount(); }
private void changeRowVKR(object sender, RoutedEventArgs e) { Model.Theses itemFocus = thesesGrid.SelectedValue as Model.Theses; AddOrChange changeTheses = new AddOrChange(itemFocus, db); changeTheses.ShowDialog(); LoadTheses(); FindCount(); }
public AddOrChange(Model.Theses theses, DocumentsContext db) { InitializeComponent(); this.theses = theses; this.db = db; btnModify.Content = "Изменить"; textBlockGroup.Text = theses.Group; textBlockProtocolNumber.Text = theses.ProtocolNumber; textBlockSurname.Text = theses.Surname; textBlockName.Text = theses.Name; textBlockPatronymic.Text = theses.Patronymic; textBlockTheme.Text = theses.Theme; textBlockDirector.Text = theses.Director; textBlockDate.Text = theses.Date.ToString(); textBlockLocation.Text = theses.Location; }