public void ExcluirEmprestimo(Emprestimo emprestimo) { try { dal = new DAL.EmprestimoDAL(); dal.DeleteEmprestimo(emprestimo); } catch (Exception ex) { throw ex; } }
public void ExcluirEmprestimo(Emprestimo emprestimo) { try { dal = new DAL.EmprestimoDAL(); if (emprestimo.DataDevolucaoReal.CompareTo(DateTime.Now) > 0) { throw new Exception("Impossivel excluir emprestimo, livro nao devolvido!"); } dal.DeleteEmprestimo(emprestimo); } catch (Exception ex) { throw ex; } }