Пример #1
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)));
     }
 }
Пример #2
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)));
     }
 }
Пример #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 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)));
     }
 }
Пример #5
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)));
     }
 }
Пример #6
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)));
     }
 }