예제 #1
0
        public bool Criar(Models.NotaFiscal nota)
        {
            bool operacao;

            DAO.NotaDAO nbd = new DAO.NotaDAO();
            operacao = nbd.Criar(nota);

            return(operacao);
        }
        private List <decimal> GanhosMeses(string ano)
        {
            var tipo = HttpContext.User.Claims.ToList()[1].Value;
            var id   = Convert.ToInt32(HttpContext.User.Claims.ToList()[3].Value);

            DAO.NotaDAO nbd = new DAO.NotaDAO();

            if (tipo == "Indústria")
            {
                return(nbd.getGanhoMesIndustria(id, ano));
            }
            else
            {
                return(nbd.getGanhoMesDistribuidor(id, ano));
            }
        }
예제 #3
0
        public List <Models.NotaFiscal> PesquisarDist(string numero, string id_dist, string tipo)
        {
            DAO.NotaDAO nbd = new DAO.NotaDAO();
            if (numero == null)
            {
                numero = "";
            }

            if (numero.Length > 3)
            {
                return(nbd.PesquisarDist(numero, id_dist, tipo));
            }
            else
            {
                return(null);
            }
        }
예제 #4
0
 public bool Excluir(int id)
 {
     DAO.NotaDAO nbd = new DAO.NotaDAO();
     return(nbd.Excluir(id));
 }
예제 #5
0
 public bool ObterNotaExistente(int numero)
 {
     DAO.NotaDAO nbd = new DAO.NotaDAO();
     return(nbd.ObterNotaExistente(numero));
 }
예제 #6
0
 public Models.NotaFiscal Obter(int id)
 {
     DAO.NotaDAO nbd = new DAO.NotaDAO();
     return(nbd.Obter(id));
 }