Exemplo n.º 1
0
        public void Remover(Proposta proposta)
        {
            if (proposta.Proposta_id < 0)
            {
                throw new Exception("Informar código de proposta");
            }

            DadosProposta d = new DadosProposta();

            d.Remover(proposta);
        }
Exemplo n.º 2
0
        public List <Proposta> Listar(Proposta proposta)
        {
            if (proposta.Proposta_id < 1)
            {
                proposta.Proposta_id = 0;
            }

            if (proposta.Orcamento.Orcamento_id < 1)
            {
                proposta.Orcamento.Orcamento_id = 0;
            }

            DadosProposta d = new DadosProposta();

            return(d.Listar(proposta));
        }
Exemplo n.º 3
0
        public void Cadastrar(Proposta proposta)
        {
            if (proposta.Orcamento.Orcamento_id < 0)
            {
                throw new Exception("Informar orçamento");
            }

            if (string.IsNullOrEmpty(proposta.Titulo))
            {
                throw new Exception("Informar título");
            }

            DadosProposta d = new DadosProposta();

            d.Cadastrar(proposta);
        }
Exemplo n.º 4
0
        public void Atualizar(Proposta proposta)
        {
            if (proposta.Proposta_id < 0)
            {
                throw new Exception("Informar código de proposta");
            }

            if (proposta.Orcamento.Orcamento_id < 0)
            {
                throw new Exception("Informar orçamento");
            }

            if (string.IsNullOrEmpty(proposta.Titulo))
            {
                throw new Exception("Informar título");
            }

            DadosProposta d = new DadosProposta();

            d.Atualizar(proposta);
        }