예제 #1
0
        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();
        }
예제 #2
0
        private void ButtonSave_OnClick(object sender, RoutedEventArgs e)
        {
            var document = DataContext as CandidateInfo;

            _repository.Create(document);
        }