Exemplo n.º 1
0
        public bool Editar(Models.Setor setor)
        {
            bool operacao = false;

            DAL.SetorDAL sbd = new DAL.SetorDAL();

            operacao = sbd.Editar(setor);

            return(operacao);
        }
Exemplo n.º 2
0
        public (bool, string) Criar(Models.Setor setor)
        {
            string msg      = "";
            bool   operacao = false;

            DAL.SetorDAL sbd = new DAL.SetorDAL();

            if (sbd.validarnomeUnico(setor.Descriçao))
            {
                msg = "setor já cadastrado.";
            }
            else
            {
                operacao = sbd.Criar(setor);
            }

            return(operacao, msg);
        }
Exemplo n.º 3
0
 public bool Excluir(int id)
 {
     DAL.SetorDAL sbd = new DAL.SetorDAL();
     return(sbd.Excluir(id));
 }
Exemplo n.º 4
0
        public List <Models.Setor> Pesquisar(string descriçao)
        {
            DAL.SetorDAL sbd = new DAL.SetorDAL();

            return(sbd.Pesquisar(descriçao));
        }
Exemplo n.º 5
0
 public List <Models.Setor> ObterTodos()
 {
     DAL.SetorDAL sbd = new DAL.SetorDAL();
     return(sbd.ObterTodos());
 }
Exemplo n.º 6
0
 public Models.Setor Obter(int id)
 {
     DAL.SetorDAL sbd = new DAL.SetorDAL();
     return(sbd.Obter(id));
 }