Ejemplo n.º 1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            var section = new SectionView();

            section.DataContext = this.DataContext;
            section.ShowDialog();
        }
Ejemplo n.º 2
0
        private void AddNewSection()
        {
            UpdateModel();

            var newSection = new Section();
            var view       = new SectionView();

            view.SetObjectToEdit = newSection;

            if (view.ShowDialog() == DialogResult.OK)
            {
                RefreshView();
                _view.comboBoxSection.SelectedIndex = _view.comboBoxSection.Items.IndexOf(newSection.Name);
            }
        }