private void deleteRowVKR(object sender, RoutedEventArgs e) { Model.Practical itemFocus = practicalGrid.SelectedValue as Model.Practical; itemFocus.DateDeleted = DateTime.Now; db.SaveChanges(); LoadPractical(); FindCount(); }
private void changeRowVKR(object sender, RoutedEventArgs e) { Model.Practical itemFocus = practicalGrid.SelectedValue as Model.Practical; AddOrChangePractical changePractical = new AddOrChangePractical(itemFocus, db); changePractical.ShowDialog(); LoadPractical(); FindCount(); }
public AddOrChangePractical(Model.Practical practical, DocumentsContext db) { InitializeComponent(); this.practical = practical; this.db = db; btnModify.Content = "Изменить"; textBlockGroup.Text = practical.Group; textBlockName.Text = practical.Name; textBlockSurname.Text = practical.Surname; textBlockPatronymic.Text = practical.Patronymic; textBlockPracticeBase.Text = practical.PracticeBase; textBlockHumanSettlement.Text = practical.HumanSettlement; textBlockStartOfPractice.Text = practical.StartOfPractice.ToString(); textBlockEndOfPractice.Text = practical.EndOfPractice.ToString(); textBlockFormOfPractice.Text = practical.FormOfPractice; textBlockFormOfPractice.Text = practical.Payment; textBlockDirector.Text = practical.Director; }
public AddOrChangePractical(DocumentsContext db) { InitializeComponent(); this.db = db; practical = new Model.Practical(); }