private void AddButton_OnClick(object sender, RoutedEventArgs e) { AddEditCheckView addModel = new AddEditCheckView(); addModel.Check = new Check(); addModel.Operation = Operation.Add; AddEditCheck addWindow = new AddEditCheck(addModel, _deptRepository, _bankRepository, _checkRepository); addWindow.ShowDialog(); if (addWindow.IsCanceled == false) { DisplaySearch(); } }
private void EditButton_OnClick(object sender, RoutedEventArgs e) { AddEditCheckView editModel = new AddEditCheckView(); editModel.CheckToEdit = _c.SelectedCheck.Id; editModel.Check = _c.SelectedCheck; editModel.Operation = Operation.Edit; AddEditCheck addWindow = new AddEditCheck(editModel, _deptRepository, _bankRepository, _checkRepository); addWindow.ShowDialog(); if (addWindow.IsCanceled == false) { DisplaySearch(); } }