Zum Hauptinhalt springen
Version: 5.2

Project Service

Dieser Service enthält Methoden um mit den Projekten von TimePunch zu arbeiten.

CreateProject

Diese Methode erzeugt ein neues Projekt und gibt es zurück. Das Projekt wird dabei direkt beim Anlegen in der Datenbank gespeichert und mit den Standardwerten gefüllt.

ProjectDto CreateProject(  
out TpFault fault,
TpAuthentication authentication,
string projectId,
string projectDescription,
string projectCode,
Guid? copyFromProject);
Needed Permissionprojects@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectIdUnique identifier of the project
projectDescriptionShort description of the project
projectCodeUnique identifier that can be used by a barcode reader
Guid?Id of the project that shall be used as a template, or NULL.
Return valueReturns the created project

DeleteProject

Diese Methode löscht ein Projekt in der Datenbank. Ein Projekt kann jedoch nur gelöscht werden, wenn keine Zeiteinträge das Projekt referenzieren. Wird das Projekt referenziert, dann empfiehlt sich ein Soft-Delete. D.h. das Lösch-Flag in der Projekt Entität muss gesetzt werden.

void DeleteProject(  
out TpFault fault,
TpAuthentication authentication,
Guid projectId);
Needed Permissionprojects@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectIdId of the project that shall be deleted

ExportProjectUserRelations

Diese Methode exportiert die Mitarbeiterspezifischen Einstellungen für ein oder mehrere Projekte.

List<ProjectUserRelationDto> ExportProjectUserRelations(  
out TpFault fault,
TpAuthentication authentication,
ProjectSearchDto projectSearch);
Needed Permissionprojects@export
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
searchCriteriaCriteria that are used for searching the projects.
Return valueCollection of project related user data

GetProjectUsers

Diese Methode liefert eine Liste mit TimePunch Profilen die auf bestimmte Projekte buchen dürfen.

List<ProjectUserDto> GetProjectUsers(  
out TpFault fault,
TpAuthentication authentication,
Guid[] projectIds);
Needed Permissionprojects@report
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectIdsCollection of project ids to load the project relevant times
Return valueList of project / user combinations that are allowed to book the relevant project ids. It also contains the scheduled work and the pool type (Shared / Private)

GetTotalProjectTimes

Diese Methode wird dazu verwendet um die aktuellen Projektzeiten für die übergebenen Projekte und Mitarbeiter abzurufen.

List<ProjectTimeDto> GetTotalProjectTimes(  
out TpFault fault,
TpAuthentication authentication,
Guid[] projectIds,
Guid[] userIds);
Needed PermissionUserIds == null ? projects@access : projects@report
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectIdsCollection of project ids to load the project relevant times
userIdsUser ids of all users for which the project data shall be loaded, or null to load the data for the current user.

ImportProjects

Diese Methode importiert eine Liste von Projekten. Im Gegensatz zu der Save Methode werden nicht die Projekt IDs, sondern der Projektname zur Identifizierung verwendet.

List<ProjectDto> ImportProjects(  
out TpFault fault,
TpAuthentication authentication,
List<ProjectDto> projects);
Needed Permissionprojects@import
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectsCollection of projects to import
Return valueA list of projects that have been saved

ImportProjectTasks

Diese Methode importiert eine Liste mit projektabhängigen Tätigkeiten. Die Tätigkeiten werden über den Beschreibungstext und nicht über die Tätigkeiten-ID identifiziert.

List<ProjectDto> ImportProjectTasks(  
out TpFault fault,
TpAuthentication authentication,
List<ProjectTaskDto> projectTasks);
Needed Permissionprojects@import
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectTasksCollection of project dependend tasks to import
Return valueA list of projects that have been saved

ImportProjectUserRelations

Diese Methode importiert die Mitarbeiterzuordnungen zu einem Projekt. Im Gegensatz zu der SaveProjectUserRelations Methode werden die Mitarbeiter nicht über die technische ID sondern überrn den Anmeldenamen zugeordnet.

List<ProjectDto> ImportProjectUserRelations(  
out TpFault fault,
TpAuthentication authentication,
List<ProjectUserRelationDto> userRelations);
Needed Permissionprojects@import
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userRelationsCollection of project user relations tasks to import
Return valueA list of projects that have been saved

LoadProject

Diese Methode lädt das Projekt mit der übergebenen Projekt-Id.

ProjectDto LoadProject(  
out TpFault fault,
TpAuthentication authentication,
Guid projectId);
Needed Permissionprojects@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectIdId of the project to load
Return valueThe loaded project data

LoadProjectUserRelations

Diese Methode lädt die Mitarbeiterspezifischen Einstellungen eines Projekts für alle authorisierten Mitarbeiter.

List<ProjectUserRelationDto> LoadProjectUserRelations(  
out TpFault fault,
TpAuthentication authentication,
Guid projectId);
Needed Permissionprojects@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectIdId of the project to load
Return valueCollection of user specific project data

MarkProjectsAsDone

Diese Methode setzt das Lösch-Flag im Projekt und markiert damit das Projekt als abgeschlossen. D.h. es können keine neuen Zeiteinträge auf das Projekt gebucht werden. Bestehende Zeiteinträge bleiben jedoch erhalten und referenzieren weiterhin das Projekt.

void MarkProjectsAsDone(  
out TpFault fault,
TpAuthentication authentication,
Guid[] projectIds);
Needed Permissionprojects@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectIdsCollection of project ids to set the soft delete flag

SaveProject

Diese Methode speichert das Projekt in der Datenbank ab.

ProjectDto SaveProject(  
out TpFault fault,
TpAuthentication authentication,
ProjectDto project,
List<ProjectUserRelationSaveDto> userRelations);
Needed Permissionprojects@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectProject data that shall be stored
userRelationsIf not null, the user relations will also be added
Return valueThe stored project data will be returned

SaveProjectUserRelations

Diese Methode aktualisiert die Mitarbeiterzuordnung in den Projekten.

List<ProjectDto> SaveProjectUserRelations(  
out TpFault fault,
TpAuthentication authentication,
List<ProjectUserRelationSaveDto> userRelations);
Needed Permissionprojects@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userRelationsList of user and project related data.
Return valueA list of projects that have been saved

SearchAuthorizedProjects

Diese Methode sucht nach Projekten, bei denen der Mitarbeiter authorisiert ist, mit den übergebenen Suchkriterien. Die gefundenen Projekte werden zurückgeliefert. Authorisierte Projekte sind alle Projekte die dem Mitarbeiter zugeordnet wurden.

List<ProjectDto> SearchAuthorizedProjects(  
out TpFault fault,
TpAuthentication authentication,
ProjectSearchDto searchCriteria);
Needed Permissionprojects@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
searchCriteriaCriteria that are used for searching the projects.
Return valueCollection of found projects

SearchReportingProjects

Diese Methode sucht nach Projekten, bei denen der Mitarbeiter berechtigt ist, Berichte zu fahren. Die gefundenen Projekte werden zurückgeliefert. Es werden alle Projekte zurückgegeben, für die der Mitarbeiter selbst, oder einer seiner –in den Gruppen - zugeordneten Mitarbeiter berechtigt ist.

List<ProjectDto> SearchReportingProjects(  
out TpFault fault,
TpAuthentication authentication,
ProjectSearchDto searchCriteria);
Needed Permissionprojects@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
searchCriteriaCriteria that are used for searching the projects.
Return valueCollection of found projects

SearchProjects

Diese Methode sucht in allen Projekten mit den übergebenen Suchkriterien. Die gefundenen Projekte werden zurückgeliefert.

List<ProjectDto> SearchProjects(  
out TpFault fault,
TpAuthentication authentication,
ProjectSearchDto searchCriteria);
Needed Permissionprojects@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
searchCriteriaCriteria that are used for searching the projects.
Return valueCollection of found projects

SetProjectLifeCycle

Diese Methode setzt den aktuellen Lebenszyklus eines oder mehreren Projekten. Der Lebenszyklus gibt an, wie das Projekt in TimePunch verwendet werden kann.

public enum ProjectLifeCycle

{

/// Life cycle is undefined

Undefined,

/// The project can be changed, but not booked

Planning,

/// The project can be changed and booked

Active,

/// The project can not be changed, not booked, but reported

Done,

/// The project can not be changed, not booked and is not visible for reporting

Deleted,

}
void SetProjectLifeCycle(  
out TpFault fault,
TpAuthentication authentication,
Guid[] projectIds,
ProjectLifeCycle projectLifeCycle);
Needed Permissionprojects@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
projectIdsCollection of project ids for that the life cycle shall be changed.
projectLifeCylceThe new life cycle to set