Beispiel #1
0
        public bool GuardarPrecio(PrecioBE objPrecio, out string mensaje)
        {
            PrecioDA objPrecioDA = new PrecioDA();

            try
            {
                using (TransactionScope transaccion = new TransactionScope(TransactionScopeOption.Required))
                {
                    if (objPrecioDA.GuardarPrecio(objPrecio, out mensaje))
                    {
                        transaccion.Complete();
                        return(true);
                    }
                    else
                    {
                        transaccion.Dispose();
                        return(false);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
        public PrecioBE ObtenerPrecio(PrecioBE oPrecio)
        {
            PrecioDA oPrecioDA = new PrecioDA();

            try
            {
                return(oPrecioDA.ObtenerPrecio(oPrecio));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                oPrecioDA = null;
            }
        }