Interface ITimeZoneAgent
Interface for the TimeZone Agent TimeZone maintenance
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("TimeZone Agent", "Interface for the TimeZone Agent. TimeZone maintenance")]
public interface ITimeZoneAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
Methods
CheckNewTimeZoneDataAvailable()
Check to see if new timezone data is available
Declaration
bool CheckNewTimeZoneDataAvailable()
Returns
Type | Description |
---|---|
Boolean | Returns true if new timezone info is found available, false otherwise |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
DeleteTimeZones()
Deletes all time zone data (locations and rules) from the database
Declaration
void DeleteTimeZones()
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
GetBaseTimeZoneId()
Get the base timezone id.
Declaration
int GetBaseTimeZoneId()
Returns
Type | Description |
---|---|
Int32 | Returns the base timezone id. Returns 0 if not set. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
GetDefaultTimeZoneInformation()
Get information about the current, preferred timezone for the current user. If no such preference has been set, returns the correct fallback (and UserPreferenceId is 0)
Declaration
PreferredTimeZone GetDefaultTimeZoneInformation()
Returns
Type | Description |
---|---|
PreferredTimeZone | Get information about the current, preferred timezone for the current user. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
GetDefaultTimeZonePreference()
Returns the id of the default timezone preference with deflevel system wide
Declaration
int GetDefaultTimeZonePreference()
Returns
Type | Description |
---|---|
Int32 | The id of the system wide default timezone preference |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
InitializeTimeZoneData()
Initalizes the TimeZoneData
Declaration
TimeZoneData[] InitializeTimeZoneData()
Returns
Type | Description |
---|---|
TimeZoneData[] |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
SetActiveTimeZoneRow(Int32, Boolean)
Set active state of singe row in the TZLocation table
Declaration
void SetActiveTimeZoneRow(int id, bool active)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | Id of row to set active state on |
Boolean | active | Set active to true or false |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
SetActiveTimeZonesByFilter(String, Boolean)
Toggles active state of a single row in the TZLocation table
Declaration
void SetActiveTimeZonesByFilter(string filter, bool active)
Parameters
Type | Name | Description |
---|---|---|
String | filter | Filter timezones |
Boolean | active | Set active to true or false |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
SetBaseTimeZoneId(Int32)
Set the base timezone id.
Declaration
bool SetBaseTimeZoneId(int timezoneId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | timezoneId | The timezone id to save |
Returns
Type | Description |
---|---|
Boolean | Returns true if setting of base timezone was done |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
TimeOfLastTimeZoneUpdate()
Get the time time zone data was last updated
Declaration
DateTime TimeOfLastTimeZoneUpdate()
Returns
Type | Description |
---|---|
DateTime | Time of last update |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
ToggleActiveTimeZoneRow(Int32)
Toggles active state of a single row in the TZLocation table
Declaration
void ToggleActiveTimeZoneRow(int id)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | Id of row to toggle active state on |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}
UpdateTimeZoneData()
Retrieve time zone data from the SuperOffice server and update TimeZone data in the database
Declaration
bool UpdateTimeZoneData()
Returns
Type | Description |
---|---|
Boolean | Returns true if the operation succeeded |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (TimeZoneAgent agent = new TimeZoneAgent())
{
// call methods on agent here...
}
}