Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #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)));
     }
 }
Пример #15
0
 public static IList <UserGroupInfo> GetGroupAndUsers()
 {
     return(UtilBLL.GetGroupUsers());
 }
Пример #16
0
 public static FuncEntry GetUserFuncs(string teacher)
 {
     return(UtilBLL.GetUserFuncs(teacher));
 }
Пример #17
0
 public static FuncEntry GetMenus()
 {
     return(UtilBLL.GetFunc());
 }