コード例 #1
0
        public ImpostoMainViewModel(ImpostoService impostoService, ImpostoViewModel impostoViewModel)
        {
            LoadedCmd         = new RelayCommand(LoadedCmd_Execute, null);
            Impostos          = new ObservableCollection <GrupoImpostos>();
            AlterarImpostoCmd = new RelayCommand <GrupoImpostos>(AlterarImpostoCmd_Execute, null);

            impostoViewModel.ImpostoAdicionadoEvent += ImpostoVM_ImpostoAdicionadoEvent;
            _impostoViewModel = impostoViewModel;
            _impostoService   = impostoService;
        }
コード例 #2
0
        public ProdutoViewModel(IProdutoService produtoService, ImpostoService impostoService)
        {
            UnidadesComerciais = new List <string>()
            {
                "UN"
            };

            AlterarProdutoCmd = new RelayCommand <string>(AlterarProduto_Execute, null);
            SalvarCmd         = new RelayCommand <IClosable>(SalvarCmd_Execute, null);
            CancelarCmd       = new RelayCommand <object>(CancelarCmd_Execute, null);
            LoadedCmd         = new RelayCommand(LoadedCmd_Execute, null);
            _produtoService   = produtoService;
            _impostoService   = impostoService;
        }
コード例 #3
0
        public ImpostoViewModel(ImpostoService impostoService)
        {
            SalvarCmd             = new RelayCommand <Window>(SalvarCmd_Execute, null);
            CancelarCmd           = new RelayCommand <object>(CancelarCmd_Execute, null);
            ImpostoSelecionadoCmd = new RelayCommand(ImpostoSelecionadoCmd_Execute, null);
            AdiciionarImpostoCmd  = new RelayCommand(AdiciionarImpostoCmd_Execute, null);

            ICMS   = new ICMS();
            ICMSST = new ICMSST();
            IPI    = new IPI();
            PIS    = new PIS();
            COFINS = new COFINS();

            Imposto         = new Imposto();
            Impostos        = new ObservableCollection <Imposto>();
            _impostoService = impostoService;
        }