Ejemplo n.º 1
0
 public Abastecimento()
 {
     Posto           = new Posto();
     UsuarioInc      = new Usuario();
     TipoVeiculo     = new TipoVeiculo();
     TipoCombustivel = new TipoCombustivel();
     Veiculo         = new Veiculo();
 }
Ejemplo n.º 2
0
 public Veiculo()
 {
     Marca           = new Marca();
     Modelo          = new Modelo();
     TipoVeiculo     = new TipoVeiculo();
     TipoCombustivel = new TipoCombustivel();
     UsuarioResp     = new Usuario();
 }
Ejemplo n.º 3
0
 private void validarCTipoCombustivel(string cTipoCombustivel)
 {
     if (string.IsNullOrEmpty(cTipoCombustivel))
     {
         ListaErros.Add("O Tipo de combustivel não pode ser vazio.");
     }
     else
     {
         TipoCombustivel.setNCodCombustivel(int.Parse(cTipoCombustivel));
     }
 }
Ejemplo n.º 4
0
        private void validarTipoCombustivel(string tipoCombustivel)
        {
            int auxtipoCombustivel;

            if (int.TryParse(tipoCombustivel, out auxtipoCombustivel))
            {
                TipoCombustivel.setNCodCombustivel(auxtipoCombustivel);
            }
            else
            {
                ListaErros.Add("O tipo de combustível está incorreto");
            }
        }
Ejemplo n.º 5
0
 public void setTipoCombustivel(TipoCombustivel tipoCombustivel)
 {
     TipoCombustivel = tipoCombustivel;
 }