private void BtnAdd_Click(object sender, EventArgs e) { var info = GetCandidateInfo(); _candidateRepository.Create(info); SharedViewLogic.LoadCandidatesTree(_treeView, _candidateRepository); var selectedNode = GetOrAddParentNode(info); SharedViewLogic.LoadCandidatesGrid(_dgvCandidates, selectedNode.Nodes); Close(); }
private void ButtonSave_OnClick(object sender, RoutedEventArgs e) { var document = DataContext as CandidateInfo; _repository.Create(document); }