Class NumberAllocationAgent
Facade for the NumberAllocation Agent This agent can be used to manage number allocation
Inherited Members
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
public class NumberAllocationAgent : AgentBase<INumberAllocationAgent>, IDisposable, INumberAllocationAgent, IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (NumberAllocationAgent agent = new NumberAllocationAgent())
{
// call methods on agent here...
}
}
Constructors
NumberAllocationAgent()
Facade for the NumberAllocation Agent This agent can be used to manage number allocation
Declaration
public NumberAllocationAgent()
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (NumberAllocationAgent agent = new NumberAllocationAgent())
{
// call methods on agent here...
}
}
Methods
CreateDefaultRefCountEntity()
Loading default values into a new RefCountEntity. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
public RefCountEntity CreateDefaultRefCountEntity()
Returns
Type | Description |
---|---|
RefCountEntity | New RefCountEntity with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (NumberAllocationAgent agent = new NumberAllocationAgent())
{
// call methods on agent here...
}
}
DeleteRefCountEntity(Int32)
Deletes the RefCountEntity
Declaration
public void DeleteRefCountEntity(int refCountEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | refCountEntityId | The identity of the RefCountEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (NumberAllocationAgent agent = new NumberAllocationAgent())
{
// call methods on agent here...
}
}
GetNumberEachTemplate()
Returns true or false if Automatically create new counters for new document templates
Declaration
public bool GetNumberEachTemplate()
Returns
Type | Description |
---|---|
Boolean | Is NumberEachTemplate? |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (NumberAllocationAgent agent = new NumberAllocationAgent())
{
// call methods on agent here...
}
}
GetRefCountEntity(Int32)
Gets a RefCountEntity object.
Declaration
public RefCountEntity GetRefCountEntity(int refCountEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | refCountEntityId | The identifier of the RefCountEntity object |
Returns
Type | Description |
---|---|
RefCountEntity | RefCountEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (NumberAllocationAgent agent = new NumberAllocationAgent())
{
// call methods on agent here...
}
}
SaveDefaultNumbering(RefCountEntity)
Saves default numbering values in preferences
Declaration
public void SaveDefaultNumbering(RefCountEntity refCountEntity)
Parameters
Type | Name | Description |
---|---|---|
RefCountEntity | refCountEntity | The refCountEntity that holds the values that will be saved |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (NumberAllocationAgent agent = new NumberAllocationAgent())
{
// call methods on agent here...
}
}
SaveRefCountEntity(RefCountEntity)
Updates the existing RefCountEntity or creates a new RefCountEntity if the id parameter is empty
Declaration
public RefCountEntity SaveRefCountEntity(RefCountEntity refCountEntity)
Parameters
Type | Name | Description |
---|---|---|
RefCountEntity | refCountEntity | The RefCountEntity that is saved. |
Returns
Type | Description |
---|---|
RefCountEntity | New or updated RefCountEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (NumberAllocationAgent agent = new NumberAllocationAgent())
{
// call methods on agent here...
}
}
SetNumberEachTemplate(Boolean)
Saves true or false if Automatically create new counters for new document templates
Declaration
public void SetNumberEachTemplate(bool setValue)
Parameters
Type | Name | Description |
---|---|---|
Boolean | setValue | true or false if Automatically create new counters for new document templates |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (NumberAllocationAgent agent = new NumberAllocationAgent())
{
// call methods on agent here...
}
}