public void LerRegiao() { DaoNotaFiscal daoNotaFiscal = new DaoNotaFiscal(); string jsonFilePath = @".\listaRegiao.txt"; if (File.Exists(jsonFilePath)) { string json = File.ReadAllText(jsonFilePath); Regiao[] listaRegiao = JsonConvert.DeserializeObject <Regiao[]>(json); daoNotaFiscal.AddRegiaoLer(listaRegiao.ToList()); } }
public void LerVendedor() { DaoNotaFiscal daoNotaFiscal = new DaoNotaFiscal(); string jsonFilePath = @".\listaVendedor.txt"; if (File.Exists(jsonFilePath)) { string json = File.ReadAllText(jsonFilePath); Vendedor[] listaVendedor = JsonConvert.DeserializeObject <Vendedor[]>(json); daoNotaFiscal.AddVendedorLer(listaVendedor.ToList()); } }
public void LerCliente() { DaoNotaFiscal daoNotaFiscal = new DaoNotaFiscal(); string jsonFilePath = @".\listaCliente.txt"; if (File.Exists(jsonFilePath)) { string json = File.ReadAllText(jsonFilePath); Cliente[] listaCliente = JsonConvert.DeserializeObject <Cliente[]>(json); daoNotaFiscal.AddClienteLer(listaCliente.ToList()); } }
public void LerNotaFiscal() { DaoNotaFiscal daoNotaFiscal = new DaoNotaFiscal(); string jsonFilePath = @".\listaNotas.txt"; if (File.Exists(jsonFilePath)) { string json = File.ReadAllText(jsonFilePath); NotaFiscal[] listaNotaFiscal = JsonConvert.DeserializeObject <NotaFiscal[]>(json); daoNotaFiscal.AddNotaFiscalLer(listaNotaFiscal.ToList()); } }