Exemplo n.º 1
0
 private void CarregarViatura()
 {
     equipeBLL                = new BLL.EquipeServices();
     cmbViatura.DataSource    = equipeBLL.CarregarViatura();
     cmbViatura.DisplayMember = "prefixo";
     cmbViatura.ValueMember   = "id_veiculo";
     cmbViatura.SelectedIndex = -1;
 }
Exemplo n.º 2
0
 private void CarregarEquipe()
 {
     equipeBLL               = new BLL.EquipeServices();
     cmbEquipe.DataSource    = equipeBLL.CarregarEquipe();
     cmbEquipe.DisplayMember = "nome_equipe";
     cmbEquipe.ValueMember   = "id";
     cmbEquipe.SelectedIndex = -1;
 }
Exemplo n.º 3
0
 private void CarregarPlantao()
 {
     equipeBLL                = new BLL.EquipeServices();
     cmbPlantao.DataSource    = equipeBLL.CarregarPlantao();
     cmbPlantao.DisplayMember = "nome_plantao";
     cmbPlantao.ValueMember   = "id";
     cmbPlantao.SelectedIndex = -1;
 }
Exemplo n.º 4
0
 //btnVeiculoAbordado
 private void button2_Click(object sender, EventArgs e)
 {
     veiculoAbordado = new VeiculoAbordado(txtCondutor.Text, txtVeiculoAbordadoMarca.Text,
                                           txtVeiculoAbordadoModelo.Text, txtVeiculoAbordadoPlaca.Text, txtEndereco.Text, id_producao);
     equipeBLL = new BLL.EquipeServices();
     MessageBox.Show(equipeBLL.CadastrarVeiculoAbordado(veiculoAbordado));
     LimparVeiculosAbordados();
 }
Exemplo n.º 5
0
 private void CarregarEncarregado(int plantao, int equipe)
 {
     if (cmbPlantao.SelectedIndex != -1 && cmbEquipe.SelectedIndex != -1)
     {
         equipeBLL = new BLL.EquipeServices();
         cmbEncarregado.DataSource    = equipeBLL.CarregarEncarregado(plantao, equipe);
         cmbEncarregado.DisplayMember = "qra";
         cmbEncarregado.ValueMember   = "id";
         cmbEncarregado.SelectedIndex = -1;
     }
 }
Exemplo n.º 6
0
 private void CarregarMotorista(int plantao, int equipe)
 {
     if (cmbPlantao.SelectedIndex != -1 && cmbEquipe.SelectedIndex != -1)
     {
         cmbMotorista.Enabled   = true;
         cmbEncarregado.Enabled = true;
         equipeBLL = new BLL.EquipeServices();
         cmbMotorista.DataSource    = equipeBLL.CarregarMotorista(plantao, equipe);
         cmbMotorista.DisplayMember = "qra";
         cmbMotorista.ValueMember   = "id";
         cmbMotorista.SelectedIndex = -1;
     }
 }
Exemplo n.º 7
0
        private void CarregarManutencao()
        {
            DataTable dt = new DataTable();

            equipeBLL  = new BLL.EquipeServices();
            manutencao = new Manutencao();
            dt         = equipeBLL.CarregarManutencao(id_viatura);
            if (dt.Rows.Count != 0)
            {
                manutencao.Km_F_Combustivel = dt.Rows[0]["km_f_combustivel"].ToString();
                manutencao.Km_F_Oleo        = dt.Rows[0]["km_f_oleo"].ToString();
                manutencao.Km_Oleo          = dt.Rows[0]["km_oleo"].ToString();
                manutencao.Km_Pdd           = dt.Rows[0]["km_pdd"].ToString();
                manutencao.Km_Pde           = dt.Rows[0]["km_pde"].ToString();
                manutencao.Km_Pte           = dt.Rows[0]["km_pte"].ToString();
                manutencao.Km_Ptd           = dt.Rows[0]["km_ptd"].ToString();

                if (cmbViatura.SelectedIndex != -1)
                {
                    if (Convert.ToInt32(txtKmTermino.Text) > Convert.ToInt32(manutencao.Km_F_Combustivel))
                    {
                        lblFCombustivel.Text      = "Trocar";
                        lblFCombustivel.ForeColor = Color.Red;
                    }

                    else
                    {
                        lblFCombustivel.Text      = "OK";
                        lblFCombustivel.ForeColor = Color.Lime;
                    }

                    if (Convert.ToInt32(txtKmTermino.Text) > Convert.ToInt32(manutencao.Km_Oleo))
                    {
                        lblOleo.Text      = "Trocar";
                        lblOleo.ForeColor = Color.Red;
                    }

                    else
                    {
                        lblOleo.Text      = "OK";
                        lblOleo.ForeColor = Color.Lime;
                    }

                    if (Convert.ToInt32(txtKmTermino.Text) > Convert.ToInt32(manutencao.Km_F_Oleo))
                    {
                        lblFOleo.Text      = "Trocar";
                        lblFOleo.ForeColor = Color.Red;
                    }

                    else
                    {
                        lblFOleo.Text      = "OK";
                        lblFOleo.ForeColor = Color.Lime;
                    }

                    if (Convert.ToInt32(txtKmTermino.Text) > Convert.ToInt32(manutencao.Km_Pdd))
                    {
                        lblPDD.Text      = "Trocar";
                        lblPDD.ForeColor = Color.Red;
                    }

                    else
                    {
                        lblPDD.Text      = "OK";
                        lblPDD.ForeColor = Color.Lime;
                    }

                    if (Convert.ToInt32(txtKmTermino.Text) > Convert.ToInt32(manutencao.Km_Pde))
                    {
                        lblPDE.Text      = "Trocar";
                        lblPDE.ForeColor = Color.Red;
                    }

                    else
                    {
                        lblPDE.Text      = "OK";
                        lblPDE.ForeColor = Color.Lime;
                    }
                    if (Convert.ToInt32(txtKmTermino.Text) > Convert.ToInt32(manutencao.Km_Pte))
                    {
                        lblPTE.Text      = "Trocar";
                        lblPTE.ForeColor = Color.Red;
                    }
                    else
                    {
                        lblPTE.Text      = "OK";
                        lblPTE.ForeColor = Color.Lime;
                    }
                    if (Convert.ToInt32(txtKmTermino.Text) > Convert.ToInt32(manutencao.Km_Ptd))
                    {
                        lblPTD.Text      = "Trocar";
                        lblPTD.ForeColor = Color.Red;
                    }
                    else
                    {
                        lblPTD.Text      = "OK";
                        lblPTD.ForeColor = Color.Lime;
                    }
                }
            }

            else
            {
                manutencao = null;
            }
        }
Exemplo n.º 8
0
 private void CarregarDataGrid()
 {
     equipeBLL = new BLL.EquipeServices();
     dgvPlantaoViaturas.DataSource = equipeBLL.CarregarDataGrid();
 }