Examples of Estoque


Examples of controleEstoque.entidades.Estoque

        try {
            BufferedReader reader = new BufferedReader(new FileReader(leArquivo()));
            String strReader = reader.readLine();
            int i = 0;
            Produto produto = new Produto();
            Estoque estoque = new Estoque();
            Estatisticas estatistica = new Estatisticas();                   
            while(strReader != null){
               
                switch (i){
                        case 0:                           
                            produto.setId(Integer.parseInt(strReader));                          
                        break;
                           
                        case 1:                           
                            produto.setNome(strReader);                          
                        break;
                           
                        case 2:
                           produto.setDescricao(strReader);                                                  
                        break;
                           
                        case 3:
                            produto.setValorUnitario(Double.parseDouble(strReader));
                        break;
                           
                        case 5:
                            estatistica.setVendaMediaMensal(Double.parseDouble(strReader));
                        break;  
                           
                        case 6:
                            estatistica.setTempoCobertura(Double.parseDouble(strReader));
                        break;  
                           
                        case 7:
                            estatistica.setEstoqueMinimo(Integer.parseInt(strReader));
                        break;  
                           
                        case 8:
                            estatistica.setEstoqueMaximo(Integer.parseInt(strReader));                                                      
                        break;                              
                           
                       case 4:
                            estoque.setQuantidade(Integer.parseInt(strReader));
                        break;       
                    }
                  i++;
                  if(i == 9){
                    i = 0;
                    estoque.setEstatistica(estatistica);
                    produto.setEstoque(estoque);                   
                    listaProdutos.adiciona(produto);
                }
                strReader = reader.readLine();               
            }
View Full Code Here

Examples of controleEstoque.entidades.Estoque

            try {               
                BufferedReader bufReader = new BufferedReader(new FileReader(file));
                String strReader = bufReader.readLine();
                int i = 0;               
                Produto produto = new Produto();
                Estoque estoque = new Estoque();
                Estatisticas estatistica = new Estatisticas();
               
                while(strReader != null){
                    switch (i){
                        case 0:                           
                            produto.setId(Integer.parseInt(strReader));                          
                        break;
                           
                        case 1:                           
                            produto.setNome(strReader);                          
                        break;
                           
                        case 2:
                           produto.setDescricao(strReader);                                                  
                        break;
                           
                        case 3:
                            produto.setValorUnitario(Double.parseDouble(strReader));
                        break;
                           
                        case 4:
                            estatistica.setVendaMediaMensal(Double.parseDouble(strReader));
                        break;  
                           
                        case 5:
                            estatistica.setTempoCobertura(Double.parseDouble(strReader));
                        break;  
                           
                        case 6:
                            estatistica.setEstoqueMinimo(Integer.parseInt(strReader));
                        break;  
                           
                        case 7:
                            estatistica.setEstoqueMaximo(Integer.parseInt(strReader));                                                      
                        break;                              
                           
                       case 8:
                            estoque.setQuantidade(Integer.parseInt(strReader));
                        break;       
                    }
                  i++;
                  if(i == 9){
                      estoque.setEstatistica(estatistica);
                      produto.setEstoque(estoque);
                      lista.adiciona(produto);
                      i = 0;
                  }
                     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.