コード例 #1
0
 public NFcsViewModel()
 {
     _nfcService      = new NFcService();
     Title            = "Minhas NFc-e";
     NFcs             = new ObservableCollection <NFc>();
     LoadItemsCommand = new Command(() => ExecuteLoadItemsCommand());
 }
コード例 #2
0
        public NFcViewModel(NFc nfc)
        {
            _nfcService = new NFcService();
            Nfc         = _nfcService.GetById(nfc.Id);

            if (Nfc.ConsumidorIdentificado)
            {
                Consumidor = $"CONSUMIDOR {Nfc.DocumentoConsumidor}";
            }
            else
            {
                Consumidor = "CONSUMIDOR NÃO IDENTIFICADO";
            }

            Comercio         = $"{Nfc.Comercio.CNPJ} - {Nfc.Comercio.RazaoSocial}";
            EnderecoComercio = Nfc.Comercio.Endereco;
        }