private void SaveCrudFolder() { CrudFolderViewModel viewModel = null; CrudFolderModel model = null; viewModel = this; if (viewModel != null && viewModel.CrudFolderModel != null) { model = viewModel._crudFolderModel; } //int parentId = MainWindow.Instance.DeviceTree.SelectedTreeNode.DeviceId; DeviceTreeModel configuration = new DeviceTreeModel() { DeviceName = model.FolderName, ConfigurationType = EnumConfigurationType.Folder, RegisterGroup = null, ListDeviceTreeModel = new List <DeviceTreeModel>() }; MainWindow.Instance.DeviceTree.SelectedTreeNode.ListDeviceTreeModel.Add(configuration); //MainWindow.Instance.DeviceTree.updateTree(); MainWindow.Instance.ShowCrudFolder = false; MainWindow.Instance.DeviceTree.updateTree(); }
public CrudFolderViewModel() { _crudFolderModel = new CrudFolderModel(); }