Exemplo n.º 1
0
 public IHttpActionResult empresaCreate(Empresa empresa)
 {
     try
     {
         EmpresaBLL bll = new EmpresaBLL();
         return(Ok(bll.createEmpresa(empresa)));
     }catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoException(ex)));
     }
 }
Exemplo n.º 2
0
 public IHttpActionResult getEstoque()
 {
     try
     {
         EstoqueBLL bll = new EstoqueBLL();
         return(Ok(bll.getEstoque()));
     }catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoEstoqueException(ex)));
     }
 }
Exemplo n.º 3
0
 public IHttpActionResult insereSaida(Saida saida)
 {
     try
     {
         SaidaBLL bll = new SaidaBLL();
         return(Ok(bll.insereSaida(saida)));
     }catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoException(ex)));
     }
 }
Exemplo n.º 4
0
 public IHttpActionResult insereEntrada(Entrada entrada)
 {
     try
     {
         EntradaBLL bll = new EntradaBLL();
         return(Ok(bll.insereEntrada(entrada)));
     }catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoException(ex)));
     }
 }
Exemplo n.º 5
0
 public IHttpActionResult getEmpresaByName(string nome)
 {
     try
     {
         EmpresaBLL bll = new EmpresaBLL();
         return(Ok(bll.getEmpresaByName(nome)));
     }catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoEmpresaException(ex)));
     }
 }
Exemplo n.º 6
0
 public IHttpActionResult getProdutosByEan(string codProd)
 {
     try
     {
         ProdutoBLL bll = new ProdutoBLL();
         return(Ok(bll.getProdutoByEan(codProd)));
     }
     catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoProdutoException(ex)));
     }
 }
Exemplo n.º 7
0
 public IHttpActionResult produtoDelete([FromBody] int id)
 {
     try
     {
         ProdutoBLL bll = new ProdutoBLL();
         return(Ok(bll.deleteProduto(id)));
     }
     catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoException(ex)));
     }
 }
Exemplo n.º 8
0
 public IHttpActionResult produtoUpdate(Produto produto)
 {
     try
     {
         ProdutoBLL bll = new ProdutoBLL();
         return(Ok(bll.updateProduto(produto)));
     }
     catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoException(ex)));
     }
 }
Exemplo n.º 9
0
 public IHttpActionResult getEstoqueByProduto([FromBody] int idProduto)
 {
     try
     {
         EstoqueBLL bll = new EstoqueBLL();
         return(Ok(bll.getEstoqueByProduto(idProduto)));
     }
     catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoEstoqueException(ex)));
     }
 }
Exemplo n.º 10
0
 public IHttpActionResult getProdutoByEmpresaContemEstoque([FromBody] int idEmpresa)
 {
     try
     {
         EstoqueBLL bll = new EstoqueBLL();
         return(Ok(bll.getProdutoByIdEmpresaEstoque(idEmpresa)));
     }
     catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoProdutoException(ex)));
     }
 }
Exemplo n.º 11
0
 public IHttpActionResult buscaSaidaPorIdProd(int idProd)
 {
     try
     {
         SaidaBLL bll = new SaidaBLL();
         return(Ok(bll.getSaidaByProduto(idProd)));
     }
     catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoSaidaException(ex)));
     }
 }
Exemplo n.º 12
0
 public IHttpActionResult buscaEntradaPorIdEmpresa(int idEmpresa)
 {
     try
     {
         EntradaBLL bll = new EntradaBLL();
         return(Ok(bll.getEntradaByEmpresa(idEmpresa)));
     }
     catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoEntradaException(ex)));
     }
 }
Exemplo n.º 13
0
 public IHttpActionResult buscaTodasEntradas()
 {
     try
     {
         EntradaBLL bll = new EntradaBLL();
         return(Ok(bll.getTodasEntradas()));
     }
     catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoEntradaException(ex)));
     }
 }
Exemplo n.º 14
0
 public IHttpActionResult empresaDelete([FromBody] int id)
 {
     try
     {
         EmpresaBLL bll = new EmpresaBLL();
         return(Ok(bll.deleteEmpresa(Convert.ToInt32(id))));
     }
     catch (Exception ex)
     {
         UtilBLL util = new UtilBLL();
         return(Ok(util.getRetornoException(ex)));
     }
 }
Exemplo n.º 15
0
 public static IList <UserGroupInfo> GetGroupAndUsers()
 {
     return(UtilBLL.GetGroupUsers());
 }
Exemplo n.º 16
0
 public static FuncEntry GetUserFuncs(string teacher)
 {
     return(UtilBLL.GetUserFuncs(teacher));
 }
Exemplo n.º 17
0
 public static FuncEntry GetMenus()
 {
     return(UtilBLL.GetFunc());
 }