// GET: Orcamento/Delete/5
 public IActionResult Delete(int id, int pedidoId)
 {
     TempPedido.msg      = null;
     TempPedido.pedidoId = pedidoId;
     _orcamentoDAO.Delete(_orcamentoDAO.BuscarPorId(id));
     return(RedirectToAction(nameof(Index)));
 }
예제 #2
0
 /// <summary>
 /// Retorna um tipo VERDADEIRO caso a instrução seja bem sucedida.
 /// </summary>
 public bool Delete(int id)
 {
     try
     {
         Transaction.Stop(false);
         Transaction.Start();
         return(regrasdados.Delete(id));
     }
     catch (Exception ex)
     {
         Transaction.Stop(false);
         throw new FaultException(ex.Message);
     }
 }