S
Stephan Steiner
Hi
Suppose I have a ProjectDataSet which contains values loaded from a project
(e.g. via ReadProject) and I go on a deleting spree (let's say a bunch of
calls to ProjectDataSet.Assignments.RemoveAssignmentRow and a bunch of calls
to ProjectDataSet.Task.RemoveTaskRow) and then call QueueUpdateProject, will
it change anything? I figure not - yet such information is conspicuously
absent from the SDK documentation - but so far I get all Rows in
RowState.Modified for QueueUpdateProject and all Rows in RowState.Added for
QueueAddToProject (and then I suppose going through all rows with
RowState.Deleted would get you a list of uids to supply to
QueueDeleteFromProject).
Then again, judging by the info in the SDK about custom fields, it seems
this approach doesn't always fly, and that you effectively have to call
QueueUpdateProject when you have deleted custom fields (but still need
QueueAddToProject to add new fields).
And then there's a third approach in the same webservice: Take the team
building mechanisms from enterprise resources. there's but one method to
update - QueueUpdateProjectTeam. So far I have successfully added
resources - and I take it that if I were to delete one row by calling
ProjectTeamDataSet.ProjectTeamDataTable.RemoveProjectTeamRow then calling
QueueUpdateProjectTeam, that resource would be removed from the project
(what happens if the resource has assignments on that project?)
So we have cases where we have an add method to add new rows, an update
method to update existing rows and a delete method to delete existing rows,
then we have another case where we have an add method to add new rows, and
an update method to update existing rows as well as deleting rows and
another case where we have one method to add/update/delete.
Looking at the methods and their description and my experiments, I think the
above is all correct - which begs the question why do we have so many
different ways of doing the same thing?
Regards
Stephan
Suppose I have a ProjectDataSet which contains values loaded from a project
(e.g. via ReadProject) and I go on a deleting spree (let's say a bunch of
calls to ProjectDataSet.Assignments.RemoveAssignmentRow and a bunch of calls
to ProjectDataSet.Task.RemoveTaskRow) and then call QueueUpdateProject, will
it change anything? I figure not - yet such information is conspicuously
absent from the SDK documentation - but so far I get all Rows in
RowState.Modified for QueueUpdateProject and all Rows in RowState.Added for
QueueAddToProject (and then I suppose going through all rows with
RowState.Deleted would get you a list of uids to supply to
QueueDeleteFromProject).
Then again, judging by the info in the SDK about custom fields, it seems
this approach doesn't always fly, and that you effectively have to call
QueueUpdateProject when you have deleted custom fields (but still need
QueueAddToProject to add new fields).
And then there's a third approach in the same webservice: Take the team
building mechanisms from enterprise resources. there's but one method to
update - QueueUpdateProjectTeam. So far I have successfully added
resources - and I take it that if I were to delete one row by calling
ProjectTeamDataSet.ProjectTeamDataTable.RemoveProjectTeamRow then calling
QueueUpdateProjectTeam, that resource would be removed from the project
(what happens if the resource has assignments on that project?)
So we have cases where we have an add method to add new rows, an update
method to update existing rows and a delete method to delete existing rows,
then we have another case where we have an add method to add new rows, and
an update method to update existing rows as well as deleting rows and
another case where we have one method to add/update/delete.
Looking at the methods and their description and my experiments, I think the
above is all correct - which begs the question why do we have so many
different ways of doing the same thing?
Regards
Stephan