Class ProjectAgent
Facade for the Project Agent Collection of all services that works with Project data.
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
public class ProjectAgent : AgentBase<IProjectAgent>, IDisposable, IProjectAgent, IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
Constructors
ProjectAgent()
Facade for the Project Agent Collection of all services that works with Project data.
Declaration
public ProjectAgent()
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
Methods
AddProjectMembers(Int32, ProjectMember[])
Add multiple project members to a project
Declaration
public void AddProjectMembers(int projectEntityId, ProjectMember[] projectMembers)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectEntityId | Project to add members to |
ProjectMember[] | projectMembers | Project members to add |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
CreateDefaultProjectEntity()
Loading default values into a new ProjectEntity. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
public ProjectEntity CreateDefaultProjectEntity()
Returns
Type | Description |
---|---|
ProjectEntity | New ProjectEntity with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
CreateDefaultProjectEventEntity()
Loading default values into a new ProjectEventEntity. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
public ProjectEventEntity CreateDefaultProjectEventEntity()
Returns
Type | Description |
---|---|
ProjectEventEntity | New ProjectEventEntity with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
CreateDefaultProjectMember()
Loading default values into a new ProjectMember. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
public ProjectMember CreateDefaultProjectMember()
Returns
Type | Description |
---|---|
ProjectMember | New ProjectMember with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
CreateNewEntry(DuplicateEntry)
Creates a new project based on external duplicate
Declaration
public int CreateNewEntry(DuplicateEntry duplicate)
Parameters
Type | Name | Description |
---|---|---|
DuplicateEntry | duplicate | The duplicate to create a new entry based upon |
Returns
Type | Description |
---|---|
Int32 | The database identity of the newly created entry |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
DeleteProjectEntity(Int32)
Deletes the ProjectEntity
Declaration
public void DeleteProjectEntity(int projectEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectEntityId | The identity of the ProjectEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
DeleteProjectEventEntity(Int32)
Deletes the ProjectEventEntity
Declaration
public void DeleteProjectEventEntity(int projectEventEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectEventEntityId | The identity of the ProjectEventEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
DeleteProjectEventEntityFromProjectId(Int32)
Delete a project event based on a project id. Does not delete the project, but does delete the published and ExternalEvent and AudienceVisibility records.
Declaration
public void DeleteProjectEventEntityFromProjectId(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | The project id of the external event to delete. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
DeleteProjectMember(Int32)
Deletes the ProjectMember
Declaration
public void DeleteProjectMember(int projectMemberId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectMemberId | The identity of the ProjectMember |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
DeleteProjectMemberByIds(Int32[])
Deletes projectmembers rows.
Declaration
public void DeleteProjectMemberByIds(int[] projectMemberIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | projectMemberIds | An Array of projectmember ids. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
DeleteProjectMembers(Int32, Int32[])
Delete the given project members from a project
Declaration
public void DeleteProjectMembers(int projectEntityId, int[] memberIds)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectEntityId | Project to remove members from |
Int32[] | memberIds | Project member ids |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetDuplicateRules()
Retrieve all available duplicate rules for project
Declaration
public DuplicateRule[] GetDuplicateRules()
Returns
Type | Description |
---|---|
DuplicateRule[] | All available duplicate rules |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetDuplicates(String)
Get duplicates(exact or similar in the database) based on the name
Declaration
public DuplicateEntry[] GetDuplicates(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name used for lookup |
Returns
Type | Description |
---|---|
DuplicateEntry[] | Any records matching the specified name |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetMyMemberProjects()
Returning the projects where an user is project member.
Declaration
public Project[] GetMyMemberProjects()
Returns
Type | Description |
---|---|
Project[] | The list of projects. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetMyProjectEvents()
Gets all project events that belongs to the currently logged on user. The list of events are filtered by the Audience Visibility restrictions set when the project event is created.
Declaration
public ProjectEvent[] GetMyProjectEvents()
Returns
Type | Description |
---|---|
ProjectEvent[] | Array of project events |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetMyProjects(Boolean)
Returning the projects belonging to an associate. If memberProjects is false only the projects where the associate is project responsible is returned, otherwise both the projects where the associate is project responsible and project member is returned.
Declaration
public Project[] GetMyProjects(bool includeMemberProjects)
Parameters
Type | Name | Description |
---|---|---|
Boolean | includeMemberProjects | True to include projects where the user is project member. |
Returns
Type | Description |
---|---|
Project[] | The list of projects |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetMyPublishedProjects()
Get published projects from the logged in user.
Declaration
public Project[] GetMyPublishedProjects()
Returns
Type | Description |
---|---|
Project[] | Projects |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetNextMilestone(Int32)
Next upcoming milestone appointment
Declaration
public Appointment GetNextMilestone(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | Project id - primary key |
Returns
Type | Description |
---|---|
Appointment | Upcoming milestone appointment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetNextProjectStatus(Int32)
Facade for the Project Agent Collection of all services that works with Project data.
Declaration
public int GetNextProjectStatus(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId |
Returns
Type | Description |
---|---|
Int32 |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProject(Int32)
Gets a Project object.
Declaration
public Project GetProject(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | The identifier of the Project object |
Returns
Type | Description |
---|---|
Project | Project |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectEntity(Int32)
Gets a ProjectEntity object.
Declaration
public ProjectEntity GetProjectEntity(int projectEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectEntityId | The identifier of the ProjectEntity object |
Returns
Type | Description |
---|---|
ProjectEntity | ProjectEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectEvent(Int32)
Gets a ProjectEvent object.
Declaration
public ProjectEvent GetProjectEvent(int projectEventId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectEventId | The identifier of the ProjectEvent object |
Returns
Type | Description |
---|---|
ProjectEvent | ProjectEvent |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectEventEntity(Int32)
Gets a ProjectEventEntity object.
Declaration
public ProjectEventEntity GetProjectEventEntity(int projectEventEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectEventEntityId | The identifier of the ProjectEventEntity object |
Returns
Type | Description |
---|---|
ProjectEventEntity | ProjectEventEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectEventEntityFromProjectId(Int32)
Get a ProjectEventEntity based on a projectId.
Declaration
public ProjectEventEntity GetProjectEventEntityFromProjectId(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | The projectId to get a ProjectEventEntity for |
Returns
Type | Description |
---|---|
ProjectEventEntity | ProjectEventEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectEventList(Int32[])
Gets an array of ProjectEvent objects.
Declaration
public ProjectEvent[] GetProjectEventList(int[] projectEventIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | projectEventIds | The identifiers of the ProjectEvent object |
Returns
Type | Description |
---|---|
ProjectEvent[] | Array of ProjectEvent objects |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectEventOnPerson(Int32, Int32)
Gets a ProjectEvent object from a project and a person.
Declaration
public ProjectEvent GetProjectEventOnPerson(int projectId, int personId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | The project Id |
Int32 | personId | Id of the person the project events belong to. |
Returns
Type | Description |
---|---|
ProjectEvent |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectEventsOnPerson(Int32)
Gets all project events that belongs to the person specified. The list of events are filtered by the Audience Visibility restrictions set when the project event is created.
Declaration
public ProjectEvent[] GetProjectEventsOnPerson(int personId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | Id of the person the project events belong to. |
Returns
Type | Description |
---|---|
ProjectEvent[] | Array of project events |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectImage(Int32)
Returns the project image that is displayed in the CRM application.
Declaration
public Image GetProjectImage(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | The project id of the project the image belongs to. |
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 (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectList(Int32[])
Gets an array of Project objects.
Declaration
public Project[] GetProjectList(int[] projectIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | projectIds | The identifiers of the Project object |
Returns
Type | Description |
---|---|
Project[] | Array of Project objects |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectMember(Int32)
Gets a ProjectMember object.
Declaration
public ProjectMember GetProjectMember(int projectMemberId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectMemberId | The identifier of the ProjectMember object |
Returns
Type | Description |
---|---|
ProjectMember | ProjectMember |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectMembers(Int32)
Returns an array of project members
Declaration
public ProjectMember[] GetProjectMembers(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | The project id |
Returns
Type | Description |
---|---|
ProjectMember[] | An array of project members |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectMembersById(Int32[])
Returns an array of project members
Declaration
public ProjectMember[] GetProjectMembersById(int[] projectMemberIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | projectMemberIds |
Returns
Type | Description |
---|---|
ProjectMember[] | An array of project members |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectsFromContact(Int32)
Returns all projects where the given contact has projectmembers.
Declaration
public Project[] GetProjectsFromContact(int contactId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | contactId | The contact id |
Returns
Type | Description |
---|---|
Project[] | ProjectListEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetProjectsFromPerson(Int32)
Return all projects where the person is project member.
Declaration
public Project[] GetProjectsFromPerson(int personId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | The person id |
Returns
Type | Description |
---|---|
Project[] | ProjectListEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetPublishedProject(Int32)
Get published project by project id.
Declaration
public Project GetPublishedProject(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | The project id. |
Returns
Type | Description |
---|---|
Project | Project |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetPublishedProjects(Int32[])
Get published projects by project ids.
Declaration
public Project[] GetPublishedProjects(int[] projectIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | projectIds | The array of project ids |
Returns
Type | Description |
---|---|
Project[] | Projects |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
GetPublishedProjectsOnPersonId(Int32)
Get published projects where person is a member
Declaration
public Project[] GetPublishedProjectsOnPersonId(int personId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | The person id |
Returns
Type | Description |
---|---|
Project[] | Array of project |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
HasGuide(Int32)
Does this project have a guide associated with its project type?
Declaration
public bool HasGuide(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | Project id |
Returns
Type | Description |
---|---|
Boolean | True if the project has a guide |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
HasGuideActivities(Int32)
Facade for the Project Agent Collection of all services that works with Project data.
Declaration
public bool HasGuideActivities(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId |
Returns
Type | Description |
---|---|
Boolean |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
IsNumberValid(Int32, String)
Checks if the number is unique or required. The setting is configured from admin under system options.
Declaration
public bool IsNumberValid(int contactId, string number)
Parameters
Type | Name | Description |
---|---|---|
Int32 | contactId | The Project id |
String | number | The number to check for uniqueness and validity |
Returns
Type | Description |
---|---|
Boolean | True if the number is valid |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
Merge(Int32, Int32, Boolean)
Merge two projects into one, removing the source project in the process
Declaration
public void Merge(int sourceProjectId, int destinationProjectId, bool replaceEmptyFieldsOnDestination)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sourceProjectId | Id of source project for merge. This project is removed after the merge is completed. |
Int32 | destinationProjectId | Id of destination project to merge to. This project is updated with info from the source. |
Boolean | replaceEmptyFieldsOnDestination | Fill in empty fields on destination from source? |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
OfferAutoNextStatusOnApppointmentCompleted(Int32)
Facade for the Project Agent Collection of all services that works with Project data.
Declaration
public bool OfferAutoNextStatusOnApppointmentCompleted(int appointmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId |
Returns
Type | Description |
---|---|
Boolean |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
SaveProjectEntity(ProjectEntity)
Updates the existing ProjectEntity or creates a new ProjectEntity if the id parameter is empty
Declaration
public ProjectEntity SaveProjectEntity(ProjectEntity projectEntity)
Parameters
Type | Name | Description |
---|---|---|
ProjectEntity | projectEntity | The ProjectEntity that is saved. |
Returns
Type | Description |
---|---|
ProjectEntity | New or updated ProjectEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
SaveProjectEventEntity(ProjectEventEntity)
Updates the existing ProjectEventEntity or creates a new ProjectEventEntity if the id parameter is empty
Declaration
public ProjectEventEntity SaveProjectEventEntity(ProjectEventEntity projectEventEntity)
Parameters
Type | Name | Description |
---|---|---|
ProjectEventEntity | projectEventEntity | The ProjectEventEntity that is saved. |
Returns
Type | Description |
---|---|
ProjectEventEntity | New or updated ProjectEventEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
SaveProjectMember(ProjectMember)
Updates the existing ProjectMember or creates a new ProjectMember if the id parameter is empty
Declaration
public ProjectMember SaveProjectMember(ProjectMember projectMember)
Parameters
Type | Name | Description |
---|---|---|
ProjectMember | projectMember | The ProjectMember that is saved. |
Returns
Type | Description |
---|---|
ProjectMember | New or updated ProjectMember |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
SaveProjectMembersFunctionAndComment(Int32[], Int32, String)
Saves role and comment on an array of projectmembers represented by ids
Declaration
public void SaveProjectMembersFunctionAndComment(int[] projectMemberIds, int roleId, string comment)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | projectMemberIds | |
Int32 | roleId | |
String | comment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
SetDuplicateRulesStatus(DuplicateRule[])
Set which duplicate rules should be active or not
Declaration
public void SetDuplicateRulesStatus(DuplicateRule[] rules)
Parameters
Type | Name | Description |
---|---|---|
DuplicateRule[] | rules | Duplicate rules to update active status for |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
SetProjectImage(Int32, Image)
Stores the project image that is displayed in the CRM application.
Declaration
public void SetProjectImage(int projectId, Image image)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | The project id of the project the image belongs to. |
Image | image | The image that is stored on the project (System.Drawing.Image) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
UpdateProjectMember(ProjectMember)
Updates a ProjectMember row.
Declaration
public ProjectMember UpdateProjectMember(ProjectMember projectMember)
Parameters
Type | Name | Description |
---|---|---|
ProjectMember | projectMember | ProjectMember to update |
Returns
Type | Description |
---|---|
ProjectMember | The Updated ProjectMember |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
UpdateProjectMembers(Int32, ProjectMember[])
Update existing project members. Not creating new (only projectmember_id > 0 accepted)
Declaration
public void UpdateProjectMembers(int projectId, ProjectMember[] projectMembers)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | Project of which members will be updated |
ProjectMember[] | projectMembers | Project members to update |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}
ValidateProjectEntity(ProjectEntity)
Check that entity is ready for saving, return error messages by field.
Declaration
public StringDictionary ValidateProjectEntity(ProjectEntity projectEntity)
Parameters
Type | Name | Description |
---|---|---|
ProjectEntity | projectEntity | Entity to be checked for errors. |
Returns
Type | Description |
---|---|
StringDictionary | Error messages tagged by field. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ProjectAgent agent = new ProjectAgent())
{
// call methods on agent here...
}
}