public string testaRecebimento()
        {
            try
            {
                if (recebimento.DataRecebimento.Equals("") || recebimento.DataRecebimento.Length < 8 || recebimento.DataRecebimento.Equals(null))
                {
                    return("Data inválida");
                }
                else if (recebimento.Descricao.Equals("") || recebimento.Descricao.Equals(null) || recebimento.Descricao.Length > 20)
                {
                    return("Descrição inválida");
                }
                else if (recebimento.Categoria.Equals("") || recebimento.Categoria.Equals(null) || recebimento.Categoria.Length > 20)
                {
                    return("Categoria inválida");
                }
                else if (recebimento.ValorRecebimento == 0 || recebimento.ValorRecebimento.Equals(null))
                {
                    return("Digite o valor");
                }
                else if (recebimento.Status < 0 || recebimento.Status > 1 || recebimento.Status.Equals(null))
                {
                    return("Status inválido");
                }

                DBRecebimento db = new DBRecebimento(recebimento);
                db.InsertRecebimento();
                return("Recebimento Inserido com Sucesso");
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        public string DeleteRecebimento(Recebimento recebimento)
        {
            string        result;
            DBRecebimento db = new DBRecebimento(recebimento);

            result = db.DeleteRecebimento();
            return(result);
        }
 public List <Recebimento> pegarRecebimentoPorData(string mes, string emailLogado)
 {
     try
     {
         List <Recebimento> retorno;
         DBRecebimento      db = new DBRecebimento();
         retorno = db.pegarRecebimentoPorData(mes, emailLogado);
         return(retorno);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
 public string UpdateRecebimento(Recebimento recebimento)
 {
     try
     {
         String        result;
         DBRecebimento db = new DBRecebimento(recebimento);
         result = db.UpdateRecebimento();
         return(result);
     }
     catch (Exception ex)
     {
         throw new Exception("Erro ao tentatar atualizar" + " " + ex.Message);
     }
 }
        public List <Recebimento> ListarRecebimento()
        {
            try
            {
                List <Recebimento> result;
                DBRecebimento      db = new DBRecebimento();
                result = db.ListarRecebimento();

                return(result);
            }
            catch (Exception ex)
            {
                throw new Exception("Erro ao tentar listar" + " " + ex.Message);
            }
        }