public void AddPurchaseOrderExecute(object parameter)
        {
            PurchaseCargoUserControl          purchaseCargoUserControl   = parameter as PurchaseCargoUserControl;
            PurchaseCargoUserControlViewModel purchaseCargoUserControlvm = purchaseCargoUserControl.DataContext as PurchaseCargoUserControlViewModel;

            PurchaseOrderCollectionViewModel = purchaseCargoUserControlvm.PurchaseOrderCollectionViewModel;
            AddPurchaseOrderWindow          addPurchaseWindow        = new AddPurchaseOrderWindow(CMContext, purchaseCargoUserControlvm.WarehouseRootViewModel);
            AddPurchaseOrderWindowViewModel addPurchaseOrderWindowvm = addPurchaseWindow.DataContext as AddPurchaseOrderWindowViewModel;

            addPurchaseOrderWindowvm.CallBack = new Func <PurchaseOrderViewModel, bool>(CallBack);
            addPurchaseWindow.Show();
        }
        public bool AddPurchaseOrderCanExecute(object parameter)
        {
            PurchaseCargoUserControl          uc   = parameter as PurchaseCargoUserControl;
            PurchaseCargoUserControlViewModel ucvm = uc.DataContext as PurchaseCargoUserControlViewModel;

            if (ucvm.PurchaseOrderCollectionViewModel == null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }