Beispiel #1
0
 private void txtBuscaStage_TextChanged(object sender, EventArgs e)
 {
     try
     {
         StageDAO     stageDAO = new StageDAO();
         List <Stage> stages;
         stages = stageDAO.BuscaServ(txtBuscaStage.Text);
         dgvStage.Rows.Clear();
         foreach (Stage s in stages)
         {
             dgvStage.Rows.Add(s.CodServ1,
                               s.PesoIni, s.PesoFin,
                               s.AceleracaoIni, s.AceleracaoFin,
                               s.TorqueIni, s.TorqueFin,
                               s.Velocidade_maxIni, s.Velocidade_maxFin,
                               s.PotenciaIni, s.PotenciaFin,
                               s.ConsumoIni, s.ConsumoFin,
                               s.Rotacao_maxIni, s.Rotacao_maxFin);
         }
     }
     catch
     {
         // Prevenindo erro do
     }
 }
Beispiel #2
0
        public void carragaG(string cod)
        {
            StageDAO     stageDAO = new StageDAO();
            List <Stage> stages;

            stages = stageDAO.BuscaServ(cod);
            foreach (Stage s in stages)
            {
                this.chartPotencia.Series["potenciaIni"].Points.AddY(s.PotenciaIni);
                this.chartPotencia.Series["potenciaFin"].Points.AddY(s.PotenciaFin);

                this.chartTorque.Series["TorqueIni"].Points.AddY(s.TorqueIni);
                this.chartTorque.Series["TorqueFin"].Points.AddY(s.TorqueFin);

                this.chartAcele.Series["AceleracaoIni"].Points.AddY(s.AceleracaoIni);
                this.chartAcele.Series["AceleracaoFin"].Points.AddY(s.AceleracaoFin);

                this.chartVeloMax.Series["velocidade_MAX_Ini"].Points.AddY(s.Velocidade_maxIni);
                this.chartVeloMax.Series["velocidade_MAX_Fin"].Points.AddY(s.Velocidade_maxFin);

                this.chartConsumo.Series["ConsumoIni"].Points.AddY(s.ConsumoIni);
                this.chartConsumo.Series["ConsumoFin"].Points.AddY(s.ConsumoFin);

                this.chartPeso.Series["PesoIni"].Points.AddY(s.PesoIni);
                this.chartPeso.Series["PesoFin"].Points.AddY(s.PesoFin);

                this.chartRotacao.Series["RotacaoIni"].Points.AddY(s.Rotacao_maxIni);
                this.chartRotacao.Series["RotacaoFin"].Points.AddY(s.Rotacao_maxFin);
            }
        }
Beispiel #3
0
        private void btSalvar_Click(object sender, EventArgs e)
        {
            StageDAO stageDAO = new StageDAO();
            Stage    stage    = getDTO();

            stageDAO.Salvar(stage);
        }
Beispiel #4
0
        private void btExecutar_Click(object sender, EventArgs e)
        {
            if (txtCarro.Text != "")
            {
                if (MessageBox.Show("Executar o Serviço? ", "Mensagem do sistema ", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    ServicoDAO servicoDAO = new ServicoDAO();
                    Servico    servico    = getDTOServ();
                    servicoDAO.Salvar(servico);

                    StageDAO stageDAO = new StageDAO();
                    Stage    stage    = getDTO();
                    stageDAO.Salvar(stage);

                    for (int i = 0; i < dgvCarrinho.Rows.Count; i++)
                    {
                        ServPecaDAO servPecaDAO = new ServPecaDAO();
                        ServPeca    servPeca    = getDTOPecaServ();
                        servPecaDAO.Salvar(servPeca);
                        r++;
                    }

                    CarroDAO car = new CarroDAO();
                    Carro    c   = getDTOCar();
                    car.AtualizaSpecs(c);


                    NotaFiscal n = new NotaFiscal();
                    ServicoDAO s = new ServicoDAO();
                    n.mostra(s.BuscaCodigo().ToString());
                    n.ShowDialog(this);

                    //para chamar o splash
                    Thread t = new Thread((new ThreadStart(Loading)));
                    ////inicializar a thread
                    t.Start();
                    Thread.Sleep(1200);
                    t.Abort();


                    MessageBox.Show("Serviço encaminhado com sucesso!");
                }

                else
                {
                    MessageBox.Show("Serviço cancelado");
                }
            }
            else
            {
                MessageBox.Show("Preencha os campos para iniciar o serviço");
            }
        }
Beispiel #5
0
        private void fillStage()
        {
            StageDAO     stageDAO = new StageDAO();
            List <Stage> stages;

            stages = stageDAO.Carregar();
            dgvStage.Rows.Clear();
            foreach (Stage s in stages)
            {
                dgvStage.Rows.Add(s.CodServ1,
                                  s.PesoIni, s.PesoFin,
                                  s.AceleracaoIni, s.AceleracaoFin,
                                  s.TorqueIni, s.TorqueFin,
                                  s.Velocidade_maxIni, s.Velocidade_maxFin,
                                  s.PotenciaIni, s.PotenciaFin,
                                  s.ConsumoIni, s.ConsumoFin,
                                  s.Rotacao_maxIni, s.Rotacao_maxFin);
            }
        }