Example #1
0
        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());
            }
        }
Example #2
0
        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());
            }
        }
Example #3
0
        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());
            }
        }
Example #4
0
        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());
            }
        }