Esempio n. 1
0
        public VisualizeInvoiceViewModel(IInvoiceToReportParamsMapper invoiceToReportParamsMapper,
                                         INavigationService navigationService)
        {
            _reportParamsMapper = invoiceToReportParamsMapper;
            _navigationService  = navigationService;

            ReprintCommand = new RelayCommand(ExecuteReprint);
            ExitCommand    = new RelayCommand(ExecuteExit);
        }
        public NewInvoiceViewModel(IInvoiceService invoiceService, IInvoiceToReportParamsMapper invoiceToReportParamsMapper,
                                   IDialogService dialogService, INavigationService navigationService)
        {
            _invoiceService = invoiceService;
            _invoiceToReportParamsMapper = invoiceToReportParamsMapper;
            _dialogService     = dialogService;
            _navigationService = navigationService;

            ServicesToProvide   = new ObservableCollection <ServiceToProvide>();
            EditServicesCommand = new RelayCommand(ExecuteEditServices);
            ConfirmCommand      = new RelayCommand(ExecuteConfirmNewInvoice, CanExecuteConfirmNewInvoice);
            CancelCommand       = new RelayCommand(() => base.OnWindowCloseRequested());

            Customer        = new Customer();
            VehicleToRepair = new Vehicle();
        }