public bool EliminarGasto(int IdGasto, out string mensaje) { GastoDA objGastoDA = new GastoDA(); try { using (TransactionScope transaccion = new TransactionScope(TransactionScopeOption.Required)) { if (objGastoDA.EliminarGasto(IdGasto, out mensaje)) { transaccion.Complete(); return(true); } else { transaccion.Dispose(); return(false); } } } catch (Exception ex) { throw ex; } }
public GastoBE ObtenerGasto(int IdGasto) { GastoDA oGastoDA = new GastoDA(); try { return(oGastoDA.ObtenerGasto(IdGasto)); } catch (Exception ex) { throw ex; } finally { oGastoDA = null; } }
public List <GastoBE> ListarGastos() { GastoDA oGastoDA = new GastoDA(); try { return(oGastoDA.ListarGastos()); } catch (Exception ex) { throw ex; } finally { oGastoDA = null; } }