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))); } }
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))); } }
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))); } }
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))); } }
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))); } }
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))); } }