private void Edit()
        {
            var entityWindow = new EditEntityWindow(typeof(MeetingsPlanningModel), _selectedItem);

            if (entityWindow.ShowDialog().Value)
            {
                ListItems[SelectedItemIndex] = entityWindow.ContentPanel.DataContext as MeetingsPlanningModel;
            }
        }
        private void New()
        {
            var entityWindow = new EditEntityWindow(typeof(MeetingsPlanningModel), _selectedItem);

            if (entityWindow.ShowDialog().Value)
            {
                var item = entityWindow.ContentPanel.DataContext as MeetingsPlanningModel;
                ListItems.Add(item);
            }
        }
Пример #3
0
        private void ShowNew()
        {
            var entityWindow = new EditEntityWindow(SelectedItem.GetType(), _meetingCentresListViewModel.SelectedItem);

            if (entityWindow.ShowDialog().Value)
            {
                ListItems.Add(entityWindow.DataContext as MeetingRoomModel);
                SelectedItemIndex = -1;
            }
        }
Пример #4
0
        private void ShowEdit()
        {
            var entityWindow = new EditEntityWindow(typeof(MeetingCentreModel), _selectedItem);

            if (entityWindow.ShowDialog().Value)
            {
                ListItems[_selectedItemIndex] = entityWindow.DataContext as MeetingCentreModel;
                _selectedItem      = null;
                _selectedItemIndex = -1;
            }
        }