public NFcsViewModel() { _nfcService = new NFcService(); Title = "Minhas NFc-e"; NFcs = new ObservableCollection <NFc>(); LoadItemsCommand = new Command(() => ExecuteLoadItemsCommand()); }
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; }