Example #1
0
        public int Salvar(DeptoDTO dto)
        {
            DeptoDatabase database = new DeptoDatabase();

            if (dto.Departamento == string.Empty)
            {
                throw new Exception("O campo 'Nome do Departamento' é obrigatório.");
            }

            return(database.Salvar(dto));
        }
Example #2
0
        public void Remover(int Id)
        {
            DeptoDatabase db = new DeptoDatabase();

            db.Remover(Id);
        }
Example #3
0
        public void Alterar(DeptoDTO dto)
        {
            DeptoDatabase db = new DeptoDatabase();

            db.Alterar(dto);
        }
Example #4
0
        public List <DeptoDTO> Consultar(string depto)
        {
            DeptoDatabase database = new DeptoDatabase();

            return(database.Consultar(depto));
        }
Example #5
0
        public List <DeptoDTO> Listar()
        {
            DeptoDatabase database = new DeptoDatabase();

            return(database.Listar());
        }