Example #1
0
 public BudgetItemCopyViewModel(ShipOwnerVMCollectionLoader shipOwnerLoader, Action <ShipOwnerViewModel> onSuccessCoping = null)
 {
     _ShipOwnerLoader = shipOwnerLoader ?? throw new ArgumentNullException("Arg shipOwnerLoader is null!");
     _OnSuccessCoping = onSuccessCoping;
     CopyCommand      = new DelegateCommand(OnCopyCommandExecute, delegate(object obj) { return(CurrentShipOwner != null); });
     CancelCommand    = new DelegateCommand(OnCancelCommandExecute);
 }
Example #2
0
        public async static void SupplierModifyViewForAdding_Show(ShipOwnerVMCollectionLoader shipOwnerLoader, Action <SupplierViewModel> onChanged)
        {
            var viewModel = new VMBaseSolutions.ModifyVMs.ModifyOnWidowVM <SupplierModifyViewModel, SupplierViewModel>(new SupplierModifyViewModel(shipOwnerLoader, onChanged));
            await viewModel.Initialize_ActionAddAsync();

            var f = new Views.Directories.Suppliers.SupplierModifyView();

            f.DataContext = viewModel;
            f.ShowDialog();
        }
        async Task ShipOwnerAvaibleCollectionInitializeAsync()
        {
            _ShipOwnerLoader = new ShipOwnerVMCollectionLoader();
            //var result = await UIMessager.Services.Execeptions.ExceptionНandling.HandleLoadingActionAsync(_ShipOwnerLoader.GetAllAsync);
            ShipOwnerVMList = await _ShipOwnerLoader.GetAllAsync();//result.ReturnValue;

            if (ShipOwnerVMList != null)
            {
                CurrentShipOwner = ShipOwnerVMList.FirstOrDefault();
            }
        }
 public SupplierModifyViewModel(ShipOwnerVMCollectionLoader shipOwnerLoader, Action <SupplierViewModel> onChanged) :
     base(onModifyViewModel: onChanged)
 {
     _ShipOwnerLoader = shipOwnerLoader;
 }