Galactix Home | Main Page | Class Hierarchy | Data Structures | Function List
#include <tsssx.idl>
Inherits IDispatch.
Public Methods | |
HRESULT | ToString ([out, retval] BSTR *pVal) |
Get a String representation of this object. More... | |
HRESULT | ParentID ([out, retval] long *pVal) |
Get the ParentID property of this object as a long. More... | |
HRESULT | AlwaysAvailable ([out, retval] BOOL *pVal) |
Get the AlwaysAvailable property of this object as a boolean. More... | |
HRESULT | UseParent ([out, retval] BOOL *pVal) |
Get the UseParent property of this object as a boolean. More... | |
HRESULT | getNumOfStartTimesOnDOW ([in] long lDOW,[out, retval] long *pVal) |
Get the number of start times on a day of the week. More... | |
HRESULT | getNumOfExceptionsOnDOW ([in] long lDOW,[out, retval] long *pVal) |
Get the number of exceptions on a day of the week. More... | |
HRESULT | getNumOfStartTimesOnDate ([in] DATE date,[out, retval] long *pVal) |
Get the number of start times on a specific date. More... | |
HRESULT | getNumOfExceptionsOnDate ([in] DATE date,[out, retval] long *pVal) |
Get the number of exceptions on a specific date. More... | |
HRESULT | getStartTimesOnDOW ([in] long lDOW,[out, retval] IStartTimeCollection **ppICollection) |
Get the collection of IStartTime's on a day of the week. More... | |
HRESULT | getExceptionsOnDOW ([in] long lDOW,[out, retval] IStartTimeCollection **ppICollection) |
Get the collection of IStartTime exceptions on a day of the week. More... | |
HRESULT | getStartTimesOnDate ([in] DATE date,[out, retval] IStartTimeCollection **ppICollection) |
Get the collection of IStartTime's on the specified date. More... | |
HRESULT | getExceptionsOnDate ([in] DATE date,[out, retval] IStartTimeCollection **ppICollection) |
Get the collection of IStartTime exceptions on the specified date. More... | |
HRESULT | getIsAvailableOnDate ([in] DATE date,[out, retval] BOOL *pfVal) |
Figure out if a certain date and time is available. More... |
The IAvailability object represents all the start times for leagues, teams, and tournaments, and it also represents the available time blocks that a venue and official are available. The IStartTime object is used to represent both start times and available time blocks. Use the IAvailability's methods to get the IStartTime's on a certain day of the week, or a specific date. Methods are also provided to get the exceptions on a certain date.
Availability objects can be dependant upon other objects in the project. For example, by default a team's availability is dependant upon the league's availability. If the selected availability is dependant upon another, the getStartTimes methods will automatically go to the parent availability to get the start times or exceptions. To find out if this availability is dependant upon another, look at the UseParent property, or the ParentID property.
Program ID: TSSSX.Availability
Example:
var oAvailability = team.Availability; var sDOW; // loop through all the days of the week for (i = 0; i < 7; i++) { switch (i) { case 0: // sunday sDOW = "Sunday"; break; case 1: // monday sDOW = "Monday"; break; case 2: // tuesday sDOW = "Tuesday"; break; case 3: // wednesday sDOW = "Wednesday"; break; case 4: // thursday sDOW = "Thursday"; break; case 5: // friday sDOW = "Friday"; break; case 6: // saturday sDOW = "Saturday"; break; } var eStartTimes = new Enumerator(oAvailability.getStartTimesOnDOW(i)); Response.WriteLine("Start times on: " + sDOW); for (; !eStartTimes.atEnd(); eStartTimes.moveNext()) { Response.WriteLine(eStartTimes.item()); } }
|
Get the AlwaysAvailable property of this object as a boolean.
if (obj.Availability.AlwaysAvailable) { Response.WriteLine("The object " + obj.Name + " is always available for game play."); } |
|
Get the ParentID property of this object as a long. Retrieves the parent availability's ID if one is set. The parent ID will correspond to a ILeague, ITeam, IVenue, or IOfficial. To figure out what type of object the parent ID corresponds to, use the IProject::getObjectType method. You may also use the UseParent property to determine if this ParentID property is valid.
if (obj.Availability.UseParent) { var iType = Project.getObjectType(obj.Availability.ParentID); var sType = "unknown"; switch (iType) { case 1: // an ILeague sType = "ILeague"; break; case 2: // an ITeam sType = "ITeam"; break; case 3: // an IVenue sType = "IVenue"; break; case 4: // an IOfficial sType = "IOfficial"; break; } Response.Write("The parent is of type " + sType); }
|
|
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."; |
|
Get the UseParent property of this object as a boolean.
if (obj.Availability.UseParent) { Response.WriteLine("This object is dependant upon the object with ID: " + obj.Availability.ParentID); } |
|
Get the collection of IStartTime exceptions on a day of the week.
var eStartTimes = obj.Availability.getExceptionsOnDOW(3); for (; !eStartTimes.atEnd(); eStartTimes.moveNext()) { oStartTime = eStartTimes.item(); // do something with the IStartTime object }
|
|
Get the collection of IStartTime exceptions on the specified date.
var today = new Date("8/15/2001"); var eStartTimes = obj.Availability.getExceptionsOnDate(today); for (; !eStartTimes.atEnd(); eStartTimes.moveNext()) { oStartTime = eStartTimes.item(); // do something with the IStartTime object }
|
|
Figure out if a certain date and time is available.
var oGame = eGames.getGame(0); if (obj.Availability.getIsAvailableOnDate(oGame.StartTime)) { // the object is available at this time } else { // the object is not available } |
|
Get the number of exceptions on a day of the week.
Response.Write("There are " + obj.Availability.getNumOfExceptionsOnDOW(2) + " exceptions which fall on Tuesday"); |
|
Get the number of exceptions on a specific date.
var today = new Date("8/15/2001"); Response.Write("There are " + obj.Availability.getNumOfExceptionsOnDate(today) + " exceptions which fall on " + today); |
|
Get the number of start times on a day of the week.
Response.Write("There are " + obj.Availability.getNumOfStartTimesOnDOW(2) + " start times on Tuesdays"); |
|
Get the number of start times on a specific date.
var today = new Date("8/15/2001"); Response.Write("There are " + obj.Availability.getNumOfStartTimesOnDate(today) + " start times on " + today); |
|
Get the collection of IStartTime's on a day of the week.
var eStartTimes = obj.Availability.getStartTimesOnDOW(3); for (; !eStartTimes.atEnd(); eStartTimes.moveNext()) { oStartTime = eStartTimes.item(); // do something with the IStartTime object }
|
|
Get the collection of IStartTime's on the specified date.
var today = new Date("8/15/2001"); var eStartTimes = obj.Availability.getStartTimesOnDate(today); for (; !eStartTimes.atEnd(); eStartTimes.moveNext()) { oStartTime = eStartTimes.item(); // do something with the IStartTime object }
|
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