Beispiel #1
0
        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;
            }
        }
Beispiel #2
0
        public GastoBE ObtenerGasto(int IdGasto)
        {
            GastoDA oGastoDA = new GastoDA();

            try
            {
                return(oGastoDA.ObtenerGasto(IdGasto));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                oGastoDA = null;
            }
        }
Beispiel #3
0
        public List <GastoBE> ListarGastos()
        {
            GastoDA oGastoDA = new GastoDA();

            try
            {
                return(oGastoDA.ListarGastos());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                oGastoDA = null;
            }
        }