Example #1
0
        public DataTable relProdDist(string lote)
        {
            var id_dist = Convert.ToInt32(HttpContext.User.Claims.ToList()[3].Value);

            DAO.ProdutoDistDAO pdbd = new DAO.ProdutoDistDAO();

            return(pdbd.getProdutos(id_dist, lote));
        }
Example #2
0
        public (bool, string) Criar(Models.ProdutoDist prodemp, string lote, int id_estoque)
        {
            bool   operacao;
            string msg;

            DAO.ProdutoDistDAO pbd = new DAO.ProdutoDistDAO();
            (operacao, msg) = pbd.Criar(prodemp, lote, id_estoque);

            return(operacao, msg);
        }
        private (List <string>, List <int>) QtdEstoqueProd()
        {
            var id = Convert.ToInt32(HttpContext.User.Claims.ToList()[3].Value);

            DAO.ProdutoDistDAO pdbd = new DAO.ProdutoDistDAO();

            DataTable dt      = pdbd.getEstoqueProd(id);
            var       saldo   = new List <int>();
            var       produto = new List <string>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow dr = dt.Rows[i];
                produto.Add(dr["descricao"].ToString());
                saldo.Add(Convert.ToInt32(dr["saldo"]));
            }

            return(produto, saldo);
        }
Example #4
0
        public DataTable Pesquisar(string descricao, int id_dist, string tipo)
        {
            DAO.ProdutoDistDAO pbd = new DAO.ProdutoDistDAO();
            if (descricao == null)
            {
                descricao = "";
            }
            else
            {
                descricao = descricao.ToLower();
            }

            if (descricao.Length > 3)
            {
                return(pbd.Pesquisar(descricao, id_dist, tipo));
            }
            else
            {
                return(null);
            }
        }
Example #5
0
 public bool Excluir(int id_prod)
 {
     DAO.ProdutoDistDAO pbd = new DAO.ProdutoDistDAO();
     return(pbd.Excluir(id_prod));
 }
Example #6
0
 public DataTable ObterDadosProdDist(int id_estoque)
 {
     DAO.ProdutoDistDAO pbd = new DAO.ProdutoDistDAO();
     return(pbd.ObterDadosProdDist(id_estoque));
 }
Example #7
0
 public Models.ProdutoDist ObterProd(string cod_dist_prod)
 {
     DAO.ProdutoDistDAO pbd = new DAO.ProdutoDistDAO();
     return(pbd.ObterProd(cod_dist_prod));
 }
Example #8
0
 public Models.ProdutoDist Obter(int id)
 {
     DAO.ProdutoDistDAO pbd = new DAO.ProdutoDistDAO();
     return(pbd.Obter(id));
 }