Ejemplo n.º 1
0
        public List<Emprestimos> PesquisarBL()
        {
            /*criar as regras de negocio*/
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.PesquisarDA();
        }
Ejemplo n.º 2
0
        public bool LivrosAtrasados(int pessoaId, DateTime hoje)
        {
            //criar as regras de negocio
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.LivrosAtrasados(pessoaId, hoje);
        }
Ejemplo n.º 3
0
        public bool ExcluirBL(Emprestimos instancia)
        {
            /*criar as regras de negocio*/
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.ExcluirDA(instancia);
        }
Ejemplo n.º 4
0
        public Int32 InserirBL(Emprestimos instancia)
        {
            /*criar as regras de negocio*/
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.InserirDA(instancia);
        }
Ejemplo n.º 5
0
        public DataTable BuscaHistorico(int pessoaId)
        {
            //criar as regras de negocio
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.BuscaHistorico(pessoaId);
        }
Ejemplo n.º 6
0
        public string VerificaSituacaoPessoa(int id_pes, bool financeiro, bool biblioteca)
        {
            PessoasDA pesDA = new PessoasDA();
            EmprestimosDA empDA = new EmprestimosDA();
            StringBuilder situacao = new StringBuilder();

            situacao.Append(pesDA.VerificaSituacaoPessoa(id_pes, financeiro, biblioteca));
            if (!empDA.VerificaQtdeMaximaEmprestimo(id_pes))
                situacao.Append("O cliente já atingiu o limite máximo de empréstimos permitido!");

            return situacao.ToString();
        }
Ejemplo n.º 7
0
        //public List<Emprestimos> PesquisarBuscaBL(string valor)
        public List<ViewEmprestimos> PesquisarBuscaBL(string valor)
        {
            //criar as regras de negocio
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.PesquisarBuscaBL(valor);
        }
Ejemplo n.º 8
0
        public List<Emprestimos> PesquisarBL(string campo, string valor)
        {
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.PesquisarDA(campo, valor);
        }
Ejemplo n.º 9
0
        public List<Emprestimos> PesquisarBL(int bai)
        {
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.PesquisarDA(bai);
        }
Ejemplo n.º 10
0
        public override List<Base> Pesquisar(string codDes)
        {
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.Pesquisar(codDes);
        }
Ejemplo n.º 11
0
        public EmprestimoMov CarregaEmpNaoDevolvido(int id_emprestimo)
        {
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.CarregaEmpNaoDevolvido(id_emprestimo);
        }
Ejemplo n.º 12
0
        public bool VerificaQtdeMaximaEmprestimo(int id_pessoa)
        {
            EmprestimosDA empDA = new EmprestimosDA();

            return empDA.VerificaQtdeMaximaEmprestimo(id_pessoa);
        }
Ejemplo n.º 13
0
        public int QuantosLivrosEmprestados(int pessoaId)
        {
            //criar as regras de negocio
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.QuantosLivrosEmprestados(pessoaId);
        }
Ejemplo n.º 14
0
        public Int32 QtdRenovacoes(int emprestimoId)
        {
            //criar as regras de negocio
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.QtdRenovacoes(emprestimoId);
        }
Ejemplo n.º 15
0
        public DataSet PesquisarDataSet(int empId)
        {
            EmprestimosDA varDA = new EmprestimosDA();

            return varDA.PesquisarDataSetDA(empId);
        }
Ejemplo n.º 16
0
        public string RetornaSituacaoTitulo(Int32 id_emp)
        {
            string erro = null;
            ParametrosDA parDa = new ParametrosDA();
            EmprestimosDA empDA = new EmprestimosDA();

            //verifica quantidade máxima de renovação
            int maxRenovacao = utils.ComparaIntComZero(parDa.PesquisarValorDA(2, "B"));
            if (empDA.QtdRenovacoes(id_emp) >= maxRenovacao)
            {
                erro = "Este título não pode ser mais renovado!";
                return erro;
            }

            return erro;
        }