public AddDataViewModel()
        {
            MsgDispatcher.AddHandler(HandleMessage);
            purchase = new Purchase();

            AddCommand("Save", new DelegateCommand(SaveCommandExecute, SaveCommandCanExecute));

            Status.Post("Все готово для роботи!");

        }
        public OperationsViewModel()
        {
            AddCommand("AddType", new DelegateCommand(AddTypeCommandExecute, CanAddType));
            AddCommand("RenameType", new DelegateCommand(RenameTypeCommandExecute, CanRenameType));
            AddCommand("DeleteType", new DelegateCommand(DeleteTypeCommandExecute, CanDeleteType));
            AddCommand("AddSubType", new DelegateCommand(AddSubTypeCommandExecute, CanAddSubType));
            AddCommand("RenameSubType", new DelegateCommand(RenameSubTypeCommandExecute, CanRenameSubType));
            AddCommand("DeleteSubType", new DelegateCommand(DeleteSubTypeCommandExecute, CanDeleteSubType));

            MsgDispatcher.AddHandler(HandleMessage);

            NewProductTypeEditable = true;
        }
        private void InitializeProperties()
        {
            MsgDispatcher.AddHandler(HandleMessage);

            LoadTypes().ContinueWith(task => Initialize());
        }