Exemplo n.º 1
0
        public void Incluir(ModeloAbastecimento modelo) {

            if (modelo.IdMotorista == 0)
            {
                throw new Exception("O Codigo do Motorista é necessario");
            }

            if (modelo.IdVeiculo == 0)
            {
                throw new Exception("O Codigo do Veiculo é necessario");
            }

            if (modelo.IdTpCombustivel == 0)
            {
                throw new Exception("O Codigo do Tipo de Combustivel é necessario");
            }

            if (modelo.AbaQtde == 0)
            {
                throw new Exception("A Quantidade é necessario");
            }

            if (modelo.AbaValor == 0)
            {
                throw new Exception("O Valor é necessario");
            }

            DALAbastecimento DALObj = new DALAbastecimento(conexao);
            DALObj.Incluir(modelo);
        }
Exemplo n.º 2
0
        public DataTable LocalizarData(DateTime data) {

            DALAbastecimento DALObj = new DALAbastecimento(conexao);
            return DALObj.LocalizarData(data);

        }
Exemplo n.º 3
0
        public void Excluir(int Codigo) {

            DALAbastecimento DALObj = new DALAbastecimento(conexao);
            DALObj.Excluir(Codigo);

        }
Exemplo n.º 4
0
        public ModeloAbastecimento CarregaModeloAbastecimento(int Codigo) {

            DALAbastecimento DALObj = new DALAbastecimento(conexao);
            return DALObj.CarregaModeloAbastecimento(Codigo);

        }
Exemplo n.º 5
0
        public DataTable LocalizarCombustivel(string tpcomb) {

            DALAbastecimento DALObj = new DALAbastecimento(conexao);
            return DALObj.LocalizarCombustivel(tpcomb);
        }
Exemplo n.º 6
0
        public DataTable LocalizarVeiculo(int Veiculo) {

            DALAbastecimento DALObj = new DALAbastecimento(conexao);
            return DALObj.LocalizarVeiculo(Veiculo);

        }
Exemplo n.º 7
0
        public DataTable LocalizarMotorista(int Motorista) {

            DALAbastecimento DALObj = new DALAbastecimento(conexao);
            return DALObj.LocalizarMotorista(Motorista);

        }