Class AudienceAgent
Facade for the Audience Agent Services specific to the Audience client
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
public class AudienceAgent : AgentBase<IAudienceAgent>, IDisposable, IAudienceAgent, IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
Constructors
AudienceAgent()
Facade for the Audience Agent Services specific to the Audience client
Declaration
public AudienceAgent()
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
Methods
CreateDefaultAudienceLayoutEntity()
Loading default values into a new AudienceLayoutEntity. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
public AudienceLayoutEntity CreateDefaultAudienceLayoutEntity()
Returns
Type | Description |
---|---|
AudienceLayoutEntity | New AudienceLayoutEntity with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
DeleteAudienceLayoutEntity(Int32)
Deletes the AudienceLayoutEntity
Declaration
public void DeleteAudienceLayoutEntity(int audienceLayoutEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | audienceLayoutEntityId | The identity of the AudienceLayoutEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
DeleteConfigParameter(String, String)
Deletes an Audience configuration parameter belonging to a Audience layout
Declaration
public void DeleteConfigParameter(string layoutName, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
String | parameterName | The name of the Audience configuration parameter |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetAudienceLayoutByName(String)
Gets an Audience layout by it's instance name
Declaration
public AudienceLayoutEntity GetAudienceLayoutByName(string layoutName)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
Returns
Type | Description |
---|---|
AudienceLayoutEntity | Audience layout entity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetAudienceLayoutEntity(Int32)
Gets a AudienceLayoutEntity object.
Declaration
public AudienceLayoutEntity GetAudienceLayoutEntity(int audienceLayoutEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | audienceLayoutEntityId | The identifier of the AudienceLayoutEntity object |
Returns
Type | Description |
---|---|
AudienceLayoutEntity | AudienceLayoutEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetAudienceLayoutOnPerson(Int32)
Gets the Audience layout belonging to the person specified.
Declaration
public AudienceLayoutEntity GetAudienceLayoutOnPerson(int personId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | The person id |
Returns
Type | Description |
---|---|
AudienceLayoutEntity | Audience layout entity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetConfigParameter(String, String)
Gets an Audience configuration parameter belonging to a given Audience layout with the specified configuration parameter name
Declaration
public AudienceConfigParameter GetConfigParameter(string layoutName, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
String | parameterName | The name of the Audience configuration parameter |
Returns
Type | Description |
---|---|
AudienceConfigParameter | The Audience configuration parameter. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetConfigParameterOnPerson(String, Int32)
Gets an Audience configuration parameter with the specified configuration parameter name on the person specified
Declaration
public AudienceConfigParameter GetConfigParameterOnPerson(string parameterName, int personId)
Parameters
Type | Name | Description |
---|---|---|
String | parameterName | The name of the Audience configuration parameter |
Int32 | personId | Id of the person the parameter belongs to |
Returns
Type | Description |
---|---|
AudienceConfigParameter | The Audience configuration parameter. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetConfigParametersByLayoutName(String)
Gets the Audience configuration parameters belonging to a given Audience layout.
Declaration
public AudienceConfigParameter[] GetConfigParametersByLayoutName(string layoutName)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
Returns
Type | Description |
---|---|
AudienceConfigParameter[] | Array of Audience configuration parameters. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetConfigParametersOnPerson(Int32)
Gets the Audience configuration parameters belonging to the person specified
Declaration
public AudienceConfigParameter[] GetConfigParametersOnPerson(int personId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | Id of the person the parameter belongs to |
Returns
Type | Description |
---|---|
AudienceConfigParameter[] | Array of Audience configuration parameters. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetConfigParameterValue(String, String)
Gets the string value of an Audience configuration parameter belonging to a given Audience layout with the specified configuration parameter name
Declaration
public string GetConfigParameterValue(string layoutName, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
String | parameterName | The name of the Audience configuration parameter |
Returns
Type | Description |
---|---|
String | The string value of the Audience configuration parameter. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetConfigParameterValueOnPerson(String, Int32)
Gets the string value of an Audience configuration parameter with the specified configuration parameter name on the person specified
Declaration
public string GetConfigParameterValueOnPerson(string parameterName, int personId)
Parameters
Type | Name | Description |
---|---|---|
String | parameterName | The name of the Audience configuration parameter |
Int32 | personId | Id of the person the parameter belongs to |
Returns
Type | Description |
---|---|
String | The string value of the Audience configuration parameter. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetDefaultCountryFlag(String)
Returns the default country flag image that is displayed in Audience when no person image is found. The image belongs to a specific Audience layout instance.
Declaration
public Image GetDefaultCountryFlag(string layoutName)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
Returns
Type | Description |
---|---|
Image | The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetDefaultPersonImage(String)
Returns the default person (sales rep) image that is displayed in Audience when no person image is found. The image belongs to a specific Audience layout instance.
Declaration
public Image GetDefaultPersonImage(string layoutName)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
Returns
Type | Description |
---|---|
Image | The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetDefaultProjectImage(String)
Returns the default project or event image that is displayed in Audience when no project/event image is found. The image belongs to a specific Audience layout instance.
Declaration
public Image GetDefaultProjectImage(string layoutName)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
Returns
Type | Description |
---|---|
Image | The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetLogoImage(String)
Facade for the Audience Agent Services specific to the Audience client
Declaration
public Image GetLogoImage(string layoutName)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName |
Returns
Type | Description |
---|---|
Image |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetMyAudienceLayout()
Gets the Audience layout belonging to the currently logged on user.
Declaration
public AudienceLayoutEntity GetMyAudienceLayout()
Returns
Type | Description |
---|---|
AudienceLayoutEntity | Audience layout entity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetMyConfigParameter(String)
Gets an Audience configuration parameter belonging to the currently logged on user with the specified configuration parameter name.
Declaration
public AudienceConfigParameter GetMyConfigParameter(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
String | parameterName | The name of the Audience configuration parameter |
Returns
Type | Description |
---|---|
AudienceConfigParameter | The Audience configuration parameter. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetMyConfigParameters()
Gets the Audience configuration parameters belonging to the currently logged on user.
Declaration
public AudienceConfigParameter[] GetMyConfigParameters()
Returns
Type | Description |
---|---|
AudienceConfigParameter[] | Array of Audience configuration parameters. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
GetMyConfigParameterValue(String)
Gets the string value of an Audience configuration parameter belonging to the currently logged on user with the specified configuration parameter name.
Declaration
public string GetMyConfigParameterValue(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
String | parameterName | The name of the Audience configuration parameter |
Returns
Type | Description |
---|---|
String | The string value of the Audience configuration parameter. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
SaveAudienceLayoutEntity(AudienceLayoutEntity)
Updates the existing AudienceLayoutEntity or creates a new AudienceLayoutEntity if the id parameter is empty
Declaration
public AudienceLayoutEntity SaveAudienceLayoutEntity(AudienceLayoutEntity audienceLayoutEntity)
Parameters
Type | Name | Description |
---|---|---|
AudienceLayoutEntity | audienceLayoutEntity | The AudienceLayoutEntity that is saved. |
Returns
Type | Description |
---|---|
AudienceLayoutEntity | New or updated AudienceLayoutEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
SaveConfigParameter(String, AudienceConfigParameter)
Saves an Audience configuration parameter belonging to a Audience layout
Declaration
public AudienceConfigParameter SaveConfigParameter(string layoutName, AudienceConfigParameter configParameter)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
AudienceConfigParameter | configParameter | The Audience configuration parameter to save. |
Returns
Type | Description |
---|---|
AudienceConfigParameter | The new or updated configuration parameter |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
SetDefaultCountryFlag(String, Image)
Stores the default country flag image that is displayed in Audience when no person image is found. The image is set on a specific Audience layout instance.
Declaration
public void SetDefaultCountryFlag(string layoutName, Image image)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
Image | image | The default country image to be stored for this Audience layout instance (System.Drawing.Image) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
SetDefaultPersonImage(String, Image)
Stores the default person (sales rep) image that is displayed in Audience when no person image is found. The image is set on a specific Audience layout instance.
Declaration
public void SetDefaultPersonImage(string layoutName, Image image)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
Image | image | The default project/event image to be stored for this Audience layout instance (System.Drawing.Image) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
SetDefaultProjectImage(String, Image)
Stores the default project or event image that is displayed in Audience when no project/event image is found. The image is set on a specific Audience layout instance.
Declaration
public void SetDefaultProjectImage(string layoutName, Image image)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | Name of the Audience layout instance |
Image | image | The default project/event image to be stored for this Audience layout instance (System.Drawing.Image) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}
SetLogoImage(String, Image)
Facade for the Audience Agent Services specific to the Audience client
Declaration
public void SetLogoImage(string layoutName, Image image)
Parameters
Type | Name | Description |
---|---|---|
String | layoutName | |
Image | image |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AudienceAgent agent = new AudienceAgent())
{
// call methods on agent here...
}
}