private void Control_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     var dataGrid = sender as DataGrid;
     var t = dataGrid?.SelectedItem as order_room;
     if (t != null)
     {
         var newWindow = new EditCheckWindow(t.check);
         newWindow.Show();
     }
 }
        public MainWindowViewModel()
        {
            OpenTestWindowCommand = new RelayCommand(arg =>
            {
                var newWindow = new SelectRoomWindow();
                newWindow.Show();
            });

            ShowAllBedCommand = new RelayCommand(arg =>
            {
                PageSource = "ShowBedsView.xaml";
            });

            ShowAllRoomCommand = new RelayCommand(act =>
            {
                PageSource = "ShowRoomsView.xaml";
            });

            RegistrNewClientCommand = new RelayCommand(arg =>
            {
                var newWindow = new CreateClientWindow();
                newWindow.Show();
            });

            CreateNewRoomCommand = new RelayCommand(arg =>
            {
                var newWindow = new CreateNewRoomWindow();
                newWindow.Show();
            });

            CreateNewBedCommand = new RelayCommand(arg =>
            {
                var newWindow = new CreateNewBedWindow();
                newWindow.Show();
            });

            ShowClientCommand = new RelayCommand(arg =>
            {
                PageSource = "ShowClientsView.xaml";
            });

            ShowAllCheckCommand = new RelayCommand(arg =>
            {
                PageSource = "ShowChecksView.xaml";
            });

            AddNewCountryCommand = new RelayCommand(act =>
            {
                var newWindow = new CreateNewCountryWindow();
                newWindow.Show();
            });

            AddNewDocumentTypeCommand = new RelayCommand(act =>
            {
                var newWindow = new CreateNewDocumentTypeWindow();
                newWindow.Show();
            });

            CreateNewCheckCommand = new RelayCommand(act =>
            {
                var newWindow = new EditCheckWindow();
                newWindow.Show();
            });
        }