Class ProjectAgent
Proxy class for the Project Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Inherited Members
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class ProjectAgent : IProjectAgent, IAgent
Constructors
ProjectAgent(IProjectImplementation, IProjectEntityImplementation, IProjectEventImplementation, IProjectEventEntityImplementation, IProjectEventListImplementation, IProjectListImplementation, IProjectMemberImplementation, IProjectMemberListImplementation, ISoRequestItemsAccessor)
Proxy class for the Project Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public ProjectAgent(IProjectImplementation projectImplementation, IProjectEntityImplementation projectEntityImplementation, IProjectEventImplementation projectEventImplementation, IProjectEventEntityImplementation projectEventEntityImplementation, IProjectEventListImplementation projectEventListImplementation, IProjectListImplementation projectListImplementation, IProjectMemberImplementation projectMemberImplementation, IProjectMemberListImplementation projectMemberListImplementation, ISoRequestItemsAccessor accessor)
Parameters
| Type | Name | Description |
|---|---|---|
| IProjectImplementation | projectImplementation | |
| IProjectEntityImplementation | projectEntityImplementation | |
| IProjectEventImplementation | projectEventImplementation | |
| IProjectEventEntityImplementation | projectEventEntityImplementation | |
| IProjectEventListImplementation | projectEventListImplementation | |
| IProjectListImplementation | projectListImplementation | |
| IProjectMemberImplementation | projectMemberImplementation | |
| IProjectMemberListImplementation | projectMemberListImplementation | |
| ISoRequestItemsAccessor | accessor |
ProjectAgent(IProjectImplementation, IProjectEntityImplementation, IProjectEventImplementation, IProjectEventEntityImplementation, IProjectEventListImplementation, IProjectListImplementation, IProjectMemberImplementation, IProjectMemberListImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository, IScriptingConfiguration, IOnlineConfiguration)
Proxy class for the Project Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public ProjectAgent(IProjectImplementation projectImplementation, IProjectEntityImplementation projectEntityImplementation, IProjectEventImplementation projectEventImplementation, IProjectEventEntityImplementation projectEventEntityImplementation, IProjectEventListImplementation projectEventListImplementation, IProjectListImplementation projectListImplementation, IProjectMemberImplementation projectMemberImplementation, IProjectMemberListImplementation projectMemberListImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository, ConfigFile.IScriptingConfiguration scriptingConfiguration, ConfigFile.IOnlineConfiguration onlineConfiguration)
Parameters
| Type | Name | Description |
|---|---|---|
| IProjectImplementation | projectImplementation | |
| IProjectEntityImplementation | projectEntityImplementation | |
| IProjectEventImplementation | projectEventImplementation | |
| IProjectEventEntityImplementation | projectEventEntityImplementation | |
| IProjectEventListImplementation | projectEventListImplementation | |
| IProjectListImplementation | projectListImplementation | |
| IProjectMemberImplementation | projectMemberImplementation | |
| IProjectMemberListImplementation | projectMemberListImplementation | |
| ISoRequestItemsAccessor | accessor | |
| IDebugUser | debugUser | |
| IServiceCallsRepository | serviceCallsRepository | |
| IScriptingConfiguration | scriptingConfiguration | |
| IOnlineConfiguration | onlineConfiguration |
Methods
AddProjectMembersAsync(int, ProjectMember[], CancellationToken)
Add multiple project members to a project
Declaration
public Task AddProjectMembersAsync(int projectEntityId, ProjectMember[] projectMembers, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectEntityId | Project to add members to |
| ProjectMember[] | projectMembers | Project members to add |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
CreateDefaultProjectEntityAsync(CancellationToken)
Loading default values into a new ProjectEntity.
Declaration
public Task<ProjectEntity> CreateDefaultProjectEntityAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEntity> | New ProjectEntity with default values |
CreateDefaultProjectEventEntityAsync(CancellationToken)
Loading default values into a new ProjectEventEntity.
Declaration
public Task<ProjectEventEntity> CreateDefaultProjectEventEntityAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEventEntity> | New ProjectEventEntity with default values |
CreateDefaultProjectMemberAsync(CancellationToken)
Loading default values into a new ProjectMember.
Declaration
public Task<ProjectMember> CreateDefaultProjectMemberAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectMember> | New ProjectMember with default values |
CreateNewEntryAsync(DuplicateEntry, CancellationToken)
Creates a new project based on external duplicate
Declaration
public Task<int> CreateNewEntryAsync(DuplicateEntry duplicate, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| DuplicateEntry | duplicate | The duplicate to create a new entry based upon |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<int> | The database identity of the newly created entry |
DeleteProjectEntityAsync(int, CancellationToken)
Deletes the ProjectEntity
Declaration
public Task DeleteProjectEntityAsync(int projectEntityId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectEntityId | The identity of the ProjectEntity |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
DeleteProjectEventEntityAsync(int, CancellationToken)
Deletes the ProjectEventEntity
Declaration
public Task DeleteProjectEventEntityAsync(int projectEventEntityId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectEventEntityId | The identity of the ProjectEventEntity |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
DeleteProjectEventEntityFromProjectIdAsync(int, CancellationToken)
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 Task DeleteProjectEventEntityFromProjectIdAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | The project id of the external event to delete. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | Nothing |
DeleteProjectMemberAsync(int, CancellationToken)
Deletes the ProjectMember
Declaration
public Task DeleteProjectMemberAsync(int projectMemberId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectMemberId | The identity of the ProjectMember |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
DeleteProjectMemberByIdsAsync(int[], CancellationToken)
Deletes projectmembers rows.
Declaration
public Task DeleteProjectMemberByIdsAsync(int[] projectMemberIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | projectMemberIds | An Array of projectmember ids. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
DeleteProjectMembersAsync(int, int[], CancellationToken)
Delete the given project members from a project
Declaration
public Task DeleteProjectMembersAsync(int projectEntityId, int[] memberIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectEntityId | Project to remove members from |
| int[] | memberIds | Project member ids |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
GetDuplicateRulesAsync(CancellationToken)
Retrieve all available duplicate rules for project
Declaration
public Task<DuplicateRule[]> GetDuplicateRulesAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<DuplicateRule[]> | All available duplicate rules |
GetDuplicatesAsync(string, CancellationToken)
Get duplicates(exact or similar in the database) based on the name
Declaration
public Task<DuplicateEntry[]> GetDuplicatesAsync(string name, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Name used for lookup |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<DuplicateEntry[]> | Any records matching the specified name |
GetMyMemberProjectsAsync(CancellationToken)
Returning the projects where an user is project member.
Declaration
public Task<Project[]> GetMyMemberProjectsAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Project[]> | The list of projects. |
GetMyProjectEventsAsync(CancellationToken)
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 Task<ProjectEvent[]> GetMyProjectEventsAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEvent[]> | Array of project events |
GetMyProjectsAsync(bool, CancellationToken)
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 Task<Project[]> GetMyProjectsAsync(bool includeMemberProjects, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | includeMemberProjects | True to include projects where the user is project member. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Project[]> | The list of projects |
GetMyPublishedProjectsAsync(CancellationToken)
Get published projects from the logged in user.
Declaration
public Task<Project[]> GetMyPublishedProjectsAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Project[]> | Projects |
GetNextMilestoneAsync(int, CancellationToken)
Next upcoming milestone appointment
Declaration
public Task<Appointment> GetNextMilestoneAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | Project id - primary key |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Appointment> | Upcoming milestone appointment |
GetNextProjectStatusAsync(int, CancellationToken)
Proxy class for the Project Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<int> GetNextProjectStatusAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<int> |
GetProjectAsync(int, CancellationToken)
Gets a Project object.
Declaration
public Task<Project> GetProjectAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | The identifier of the Project object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Project> | A single Project |
GetProjectEntityAsync(int, CancellationToken)
Gets a ProjectEntity object.
Declaration
public Task<ProjectEntity> GetProjectEntityAsync(int projectEntityId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectEntityId | The identifier of the ProjectEntity object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEntity> | A single ProjectEntity |
GetProjectEventAsync(int, CancellationToken)
Gets a ProjectEvent object.
Declaration
public Task<ProjectEvent> GetProjectEventAsync(int projectEventId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectEventId | The identifier of the ProjectEvent object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEvent> | A single ProjectEvent |
GetProjectEventEntityAsync(int, CancellationToken)
Gets a ProjectEventEntity object.
Declaration
public Task<ProjectEventEntity> GetProjectEventEntityAsync(int projectEventEntityId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectEventEntityId | The identifier of the ProjectEventEntity object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEventEntity> | A single ProjectEventEntity |
GetProjectEventEntityFromProjectIdAsync(int, CancellationToken)
Get a ProjectEventEntity based on a projectId.
Declaration
public Task<ProjectEventEntity> GetProjectEventEntityFromProjectIdAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | The projectId to get a ProjectEventEntity for |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEventEntity> | ProjectEventEntity |
GetProjectEventListAsync(int[], CancellationToken)
Gets an array of ProjectEvent objects.
Declaration
public Task<ProjectEvent[]> GetProjectEventListAsync(int[] projectEventIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | projectEventIds | The identifiers of the ProjectEvent object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEvent[]> | Array of ProjectEvent |
GetProjectEventOnPersonAsync(int, int, CancellationToken)
Gets a ProjectEvent object from a project and a person.
Declaration
public Task<ProjectEvent> GetProjectEventOnPersonAsync(int projectId, int personId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | The project Id |
| int | personId | Id of the person the project events belong to. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEvent> |
GetProjectEventsOnPersonAsync(int, CancellationToken)
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 Task<ProjectEvent[]> GetProjectEventsOnPersonAsync(int personId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | Id of the person the project events belong to. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEvent[]> | Array of project events |
GetProjectImageAsync(int, CancellationToken)
Returns the project image that is displayed in the CRM application.
Declaration
public Task<Image> GetProjectImageAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | The project id of the project the image belongs to. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<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.) |
GetProjectListAsync(int[], CancellationToken)
Gets an array of Project objects.
Declaration
public Task<Project[]> GetProjectListAsync(int[] projectIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | projectIds | The identifiers of the Project object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Project[]> | Array of Project |
GetProjectMemberAsync(int, CancellationToken)
Gets a ProjectMember object.
Declaration
public Task<ProjectMember> GetProjectMemberAsync(int projectMemberId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectMemberId | The identifier of the ProjectMember object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectMember> | A single ProjectMember |
GetProjectMembersAsync(int, CancellationToken)
Returns an array of project members
Declaration
public Task<ProjectMember[]> GetProjectMembersAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | The project id |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectMember[]> | An array of project members |
GetProjectMembersByIdAsync(int[], CancellationToken)
Returns an array of project members
Declaration
public Task<ProjectMember[]> GetProjectMembersByIdAsync(int[] projectMemberIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | projectMemberIds | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectMember[]> | An array of project members |
GetProjectsFromContactAsync(int, CancellationToken)
Returns all projects where the given contact has projectmembers.
Declaration
public Task<Project[]> GetProjectsFromContactAsync(int contactId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contactId | The contact id |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Project[]> | ProjectListEntity |
GetProjectsFromPersonAsync(int, CancellationToken)
Return all projects where the person is project member.
Declaration
public Task<Project[]> GetProjectsFromPersonAsync(int personId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | The person id |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Project[]> | ProjectListEntity |
GetPublishedProjectAsync(int, CancellationToken)
Get published project by project id.
Declaration
public Task<Project> GetPublishedProjectAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | The project id. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Project> | Project |
GetPublishedProjectsAsync(int[], CancellationToken)
Get published projects by project ids.
Declaration
public Task<Project[]> GetPublishedProjectsAsync(int[] projectIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | projectIds | The array of project ids |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Project[]> | Projects |
GetPublishedProjectsOnPersonIdAsync(int, CancellationToken)
Get published projects where person is a member
Declaration
public Task<Project[]> GetPublishedProjectsOnPersonIdAsync(int personId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | The person id |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Project[]> | Array of project |
HasGuideActivitiesAsync(int, CancellationToken)
Proxy class for the Project Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<bool> HasGuideActivitiesAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> |
HasGuideAsync(int, CancellationToken)
Does this project have a guide associated with its project type?
Declaration
public Task<bool> HasGuideAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | Project id |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the project has a guide |
IsNumberValidAsync(int, string, CancellationToken)
Checks if the number is unique or required. The setting is configured from admin under system options.
Declaration
public Task<bool> IsNumberValidAsync(int contactId, string number, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contactId | The Project id |
| string | number | The number to check for uniqueness and validity |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the number is valid |
MergeAsync(int, int, bool, CancellationToken)
Merge two projects into one, removing the source project in the process
Declaration
public Task MergeAsync(int sourceProjectId, int destinationProjectId, bool replaceEmptyFieldsOnDestination, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | sourceProjectId | Id of source project for merge. This project is removed after the merge is completed. |
| int | destinationProjectId | Id of destination project to merge to. This project is updated with info from the source. |
| bool | replaceEmptyFieldsOnDestination | Fill in empty fields on destination from source? |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
OfferAutoNextStatusOnApppointmentCompletedAsync(int, CancellationToken)
Proxy class for the Project Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Declaration
public Task<bool> OfferAutoNextStatusOnApppointmentCompletedAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | appointmentId | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> |
SaveProjectEntityAsync(ProjectEntity, CancellationToken)
Updates the existing ProjectEntity or creates a new ProjectEntity if the id parameter is 0.
Declaration
public Task<ProjectEntity> SaveProjectEntityAsync(ProjectEntity projectEntity, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ProjectEntity | projectEntity | The ProjectEntity that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEntity> | New or updated ProjectEntity |
SaveProjectEventEntityAsync(ProjectEventEntity, CancellationToken)
Updates the existing ProjectEventEntity or creates a new ProjectEventEntity if the id parameter is 0.
Declaration
public Task<ProjectEventEntity> SaveProjectEventEntityAsync(ProjectEventEntity projectEventEntity, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ProjectEventEntity | projectEventEntity | The ProjectEventEntity that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectEventEntity> | New or updated ProjectEventEntity |
SaveProjectMemberAsync(ProjectMember, CancellationToken)
Updates the existing ProjectMember or creates a new ProjectMember if the id parameter is 0.
Declaration
public Task<ProjectMember> SaveProjectMemberAsync(ProjectMember projectMember, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ProjectMember | projectMember | The ProjectMember that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectMember> | New or updated ProjectMember |
SaveProjectMembersFunctionAndCommentAsync(int[], int, string, CancellationToken)
Saves role and comment on an array of projectmembers represented by ids
Declaration
public Task SaveProjectMembersFunctionAndCommentAsync(int[] projectMemberIds, int roleId, string comment, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | projectMemberIds | |
| int | roleId | |
| string | comment | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
SetCompletedAsync(int, bool, CancellationToken)
Set the completed flag on the project
Declaration
public Task SetCompletedAsync(int projectId, bool isCompleted, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | |
| bool | isCompleted | True if the project is completed, false if it is not |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
SetDuplicateRulesStatusAsync(DuplicateRule[], CancellationToken)
Set which duplicate rules should be active or not
Declaration
public Task SetDuplicateRulesStatusAsync(DuplicateRule[] rules, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| DuplicateRule[] | rules | Duplicate rules to update active status for |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
SetProjectImageAsync(int, Image, CancellationToken)
Stores the project image that is displayed in the CRM application.
Declaration
public Task SetProjectImageAsync(int projectId, Image image, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | The project id of the project the image belongs to. |
| Image | image | The image that is stored on the project (System.Drawing.Image) |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
UpdateProjectMemberAsync(ProjectMember, CancellationToken)
Updates a ProjectMember row.
Declaration
public Task<ProjectMember> UpdateProjectMemberAsync(ProjectMember projectMember, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ProjectMember | projectMember | ProjectMember to update |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ProjectMember> | The Updated ProjectMember |
UpdateProjectMembersAsync(int, ProjectMember[], CancellationToken)
Update existing project members. Not creating new (only projectmember_id > 0 accepted)
Declaration
public Task UpdateProjectMembersAsync(int projectId, ProjectMember[] projectMembers, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | projectId | Project of which members will be updated |
| ProjectMember[] | projectMembers | Project members to update |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
ValidateProjectEntityAsync(ProjectEntity, CancellationToken)
Check that entity is ready for saving, return error messages by field.
Declaration
public Task<StringDictionary> ValidateProjectEntityAsync(ProjectEntity projectEntity, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ProjectEntity | projectEntity | Entity to be checked for errors. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StringDictionary> | Error messages tagged by field. |