示例#1
0
        public virtual global::System.Nullable <short> Test()
        {
            global::Oracle.ManagedDataAccess.Client.OracleCommand command = ((global::Oracle.ManagedDataAccess.Client.OracleCommand)(this.CommandCollection[0]));
            global::System.Data.ConnectionState previousConnectionState   = command.Connection.State;
            if (((command.Connection.State & global::System.Data.ConnectionState.Open)
                 != global::System.Data.ConnectionState.Open))
            {
                command.Connection.Open();
            }
            object returnValue;

            try {
                returnValue = command.ExecuteScalar();
            }
            finally {
                if ((previousConnectionState == global::System.Data.ConnectionState.Closed))
                {
                    command.Connection.Close();
                }
            }
            if (((returnValue == null) ||
                 (returnValue.GetType() == typeof(global::System.DBNull))))
            {
                return(new global::System.Nullable <short>());
            }
            else
            {
                return(new global::System.Nullable <short>(((short)(returnValue))));
            }
        }
        public virtual int ACTUALIZAR_SUCURSAL(global::System.Nullable <decimal> IDSUC, string NOM, string DIR)
        {
            global::Oracle.ManagedDataAccess.Client.OracleCommand command = ((global::Oracle.ManagedDataAccess.Client.OracleCommand)(this.CommandCollection[0]));
            if ((IDSUC.HasValue == true))
            {
                command.Parameters[0].Value = ((decimal)(IDSUC.Value));
            }
            else
            {
                command.Parameters[0].Value = global::System.DBNull.Value;
            }
            if ((NOM == null))
            {
                command.Parameters[1].Value = global::System.DBNull.Value;
            }
            else
            {
                command.Parameters[1].Value = ((string)(NOM));
            }
            if ((DIR == null))
            {
                command.Parameters[2].Value = global::System.DBNull.Value;
            }
            else
            {
                command.Parameters[2].Value = ((string)(DIR));
            }
            global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
            if (((command.Connection.State & global::System.Data.ConnectionState.Open)
                 != global::System.Data.ConnectionState.Open))
            {
                command.Connection.Open();
            }
            int returnValue;

            try {
                returnValue = command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == global::System.Data.ConnectionState.Closed))
                {
                    command.Connection.Close();
                }
            }
            return(returnValue);
        }