public ShowRoomsViewModel() { Recalck(); PropertyChanged += ShowBedsViewModel_PropertyChanged; CreateNewRoomCommand = new RelayCommand(act => { var newWindow = new CreateNewRoomWindow(); newWindow.Show(); newWindow.Closed += NewWindow_Closed; }); }
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(); }); }