public Boolean OPE_Save_GenerarCuentasCorrientes(Int16 x_EMPR_Codigo, Int16 x_SUCR_Codigo, Int32 x_NVIA_Codigo, Nullable <Int16> x_CCOT_Tipo, Nullable <Int32> x_CCOT_Numero, Decimal x_CCCT_TipoCambio, DateTime x_CCCT_FecEmision, String x_AUDI_Usuario, Boolean AprobarViaje, ref String x_mensaje)
        {
            try
            {
                Boolean _isCorrect = true;

                Infrastructure.Aspect.DataAccess.DataAccessEnterpriseSQL.DABeginTransaction();

                _isCorrect = OPE_Validate_GenerarCuentasCorrientes(x_EMPR_Codigo, x_SUCR_Codigo, x_NVIA_Codigo, x_CCOT_Tipo, x_CCOT_Numero, ref x_mensaje);

                if (_isCorrect)
                {
                    _isCorrect = OPE_Insert_GenerarCuentasCorrientes(x_EMPR_Codigo, x_SUCR_Codigo, x_NVIA_Codigo, x_CCOT_Tipo, x_CCOT_Numero, x_CCCT_TipoCambio, x_CCCT_FecEmision, x_AUDI_Usuario, ref x_mensaje);
                }

                if (_isCorrect && AprobarViaje)
                {
                    _isCorrect = BL_NaveViaje.SaveAprobarStatment(x_NVIA_Codigo, x_AUDI_Usuario, ref x_mensaje);
                }

                if (_isCorrect)
                {
                    Infrastructure.Aspect.DataAccess.DataAccessEnterpriseSQL.DACommitTransaction();
                }
                else
                {
                    Infrastructure.Aspect.DataAccess.DataAccessEnterpriseSQL.DARollbackTransaction();
                }

                return(_isCorrect);
            }
            catch (Exception)
            { Infrastructure.Aspect.DataAccess.DataAccessEnterpriseSQL.DARollbackTransaction(); throw; }
        }
示例#2
0
 public bool SaveAprobarStatment(Int32 x_NVIA_Codigo, String x_AUDI_Usuario, ref String x_NVIA_MensajeError)
 {
     try
     {
         return(BL_NaveViaje.SaveAprobarStatment(x_NVIA_Codigo, x_AUDI_Usuario, ref x_NVIA_MensajeError));
     }
     catch (Exception)
     { throw; }
 }