public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { externalCommandData = commandData; ViewModelRoom viewModel = new ViewModelRoom(); ExternalEvent externalEvent = ExternalEvent.Create(viewModel); // Показать окно. ViewRoom u1 = new ViewRoom(externalEvent, commandData, viewModel); u1.Show(); return(Result.Succeeded); }
private void SaveNewNames() { ItemCollection dataRows = DataGrid.Items; var rooms = ViewRoom.GetFoundedRooms(); try { foreach (RoomModel row in dataRows) { rooms.Where(w => w.Id == row.RoomId).FirstOrDefault().Name = row.RoomName; } } catch (Exception) { } }