Galactix Home | Main Page | Class Hierarchy | Data Structures | Function List

IStartTime Interface Reference

The IStartTime object. More...

#include <tsssx.idl>

Inherits IDispatch.


Public Methods

HRESULT ToString ([out, retval] BSTR *pVal)
 Get a String representation of this object. More...

HRESULT StartTime ([out, retval] DATE *pVal)
 Get the StartTime property of this object as a DATE. More...

HRESULT IsBlock ([out, retval] BOOL *pVal)
 Get the IsBlock property of this object as a BOOL. More...

HRESULT TypeName ([out, retval] BSTR *pVal)
 Get the TypeName property of this object as a String. More...

HRESULT EndTime ([out, retval] DATE *pVal)
 Get the EndTime property of this object as a DATE. More...

HRESULT IsAvailable ([out, retval] BOOL *pVal)
 Get the IsAvailable property of this object as a boolean. More...

HRESULT UseEndTime ([out, retval] BOOL *pVal)
 Get the UseEndTime property of this object as a boolean. More...

HRESULT Type ([out, retval] long *pVal)
 Get the Type property of this object as an long. More...


Detailed Description

The IStartTime object.

The IStartTime object represents a game start time (in which case the StartTime and EndTime properties are the same), or it represents a block of available time (in which case the StartTime and EndTime properties differ). IStartTime's can be one of four different types which are listed below.

1This start time pertains only to Season games
2This start time pertains only to Practice games
4This start time pertains only to Tournament games
8This start time pertains to All games

If this IStartTime represents a day/time that is not available, the IsAvailable property will be false. For example, let's say a venue is closed on December 25th 2001 so no games can be played. The StartTime property would specify the date 12/25/2001 (as would the EndDate property), the Type property would be set to 8 (meaning this IStartTime pertains to all types of games), and the IsAvailable property would be set to false.

Program ID: TSSSX.StartTime

Example:

    var today = new Date("12/25/2001");
    var eStartTimes = new Enumerator(oTeam.Availability.getExceptionsOnDate(today));
    for (; !eStartTimes.atEnd(); eStartTimes.moveNext())
    {
        oStartTime = eStartTimes.item();
        if (!oStartTime.IsAvailable)
        {
            Response.WriteLine("This team is not available on " + today + 
                " for " + oStartTime.TypeName + " games.");
        }
    }

See also:
IAvailability


Member Function Documentation

HRESULT IStartTime::EndTime [out, retval] DATE *    pVal
 

Get the EndTime property of this object as a DATE.

Example:

    var end;
    if (starttime.IsAvailable)
    {
        end = new Date(starttime.EndTime);
    }

HRESULT IStartTime::IsAvailable [out, retval] BOOL *    pVal
 

Get the IsAvailable property of this object as a boolean.

Returns:
Returns true if the StartTime field is valid, false otherwise.
Example:
    var start;
    if (starttime.IsAvailable)
    {
        start = new Date(starttime.StartTime);
    }

HRESULT IStartTime::IsBlock [out, retval] BOOL *    pVal
 

Get the IsBlock property of this object as a BOOL.

If this IStartTime is available and the end time is valid, then this IStartTime object represents a block of time - that is the StartTime and EndTime properties are valid.

Returns:
Returns true if this IStartTime represents a block of time, false otherwise.
Example:
    if (starttime.IsBlock)
    {
        Response.Write("This is available from " + starttime.StartTime + " to " + 
            starttime.EndTime + " for " + starttime.TypeName + " games.");
    }

HRESULT IStartTime::StartTime [out, retval] DATE *    pVal
 

Get the StartTime property of this object as a DATE.

Example:

    var start;
    if (starttime.IsAvailable)
    {
        start = new Date(starttime.StartTime);
    }

HRESULT IStartTime::ToString [out, retval] BSTR *    pVal
 

Get a String representation of this object.

Example:

    var sImplicit = "The object '" + obj + "' ToString property was called implicitly.";
    var sDirect = "The object '" + obj.ToString + "' ToString property was called directly.";

HRESULT IStartTime::Type [out, retval] long *    pVal
 

Get the Type property of this object as an long.

IStartTime's can be one of four different types which are listed below.
1This start time pertains only to Season games
2This start time pertains only to Practice games
4This start time pertains only to Tournament games
8This start time pertains to All games

Returns:
Returns an integer value corresponding to the type as specified above.
Example:
    var end;
    if (starttime.Type == 8)
    {
        Response.Write("This start time applies to all games.");
    }

HRESULT IStartTime::TypeName [out, retval] BSTR *    pVal
 

Get the TypeName property of this object as a String.

The following text values are returned for the types:
1Season
2Practice
4Tournament
8All

Returns:
Returns the corresponding Text name for the type of IStartTime this is.
Example:
    if (starttime.IsBlock)
    {
        Response.Write("This is available from " + starttime.StartTime + " to " + 
            starttime.EndTime + " for " + starttime.TypeName + " games.");
    }

HRESULT IStartTime::UseEndTime [out, retval] BOOL *    pVal
 

Get the UseEndTime property of this object as a boolean.

Returns:
Returns true if the EndTime field is valid, false otherwise.
Example:
    var end;
    if (starttime.UseEndTime)
    {
        end = new Date(starttime.EndTime);
    }


Galactix Home | Main Page | Class Hierarchy | Data Structures | Function List

Copyright © 1996-2007, Galactix Software. All rights reserved.
Questions? Comments? Send email to support@galactix.com