Exemplo n.º 1
0
        public static async Task <HttpResponseMessage> DeletarEmitenteBLL(int id)
        {
            if (id < 1)
            {
                throw new Exception("O Emitente não pode ser zero ou negativo. Verifique");
            }

            return(await EmitenteDAO.DeletarEmitenteDAO(id));
        }
Exemplo n.º 2
0
        public static async Task <HttpResponseMessage> AtualizarEmitenteBLL(Emitente emitente)
        {
            if (emitente.NomeFantasia == string.Empty)
            {
                throw new Exception("Nome do emitente é obrigatório!");
            }

            if (emitente.CNPJ == string.Empty)
            {
                throw new Exception("CNPJ do emitente é obrigatório!");
            }

            emitente.Pais       = "BRASIL";
            emitente.PaisCodigo = 1058;

            return(await EmitenteDAO.AtualizarEmitenteDAO(emitente));
        }
Exemplo n.º 3
0
 public static async Task <List <Emitente> > GetEmitenteBLL()
 {
     return(await EmitenteDAO.GetEmitenteDAO());
 }