Hi,
I have to clear task’s ResourceAssignment and add new assignments, but I’m facing that problem (see attached image).
How can I do this?
Source:
while(task.Assignments.Count > 0)
task.Assignments.First().Delete();
foreach (PrjSyncInsumoRelac relac in tarefa.InsumoRelacs)
{
Resource resource = PrjAsposeUtils.getResourceByGuid(asposeProject, relac.Insumo.PrimaryKey);
ResourceAssignment assignment = asposeProject.ResourceAssignments.Add(task, resource, RMSConvert.ToDouble(relac.Quantidade));
}
StackTrace:
em System.DateTime.AddTicks(Int64 value)
em Aspose.Tasks.Calendar. (DateTime )
em . (DateTime , Calendar )
em . (DateTime , TimephasedDataType , TimeSpan , Boolean )
em . (DateTime , TimeSpan , TimephasedDataType , Boolean )
em Aspose.Tasks.ResourceAssignment. (DateTime , DateTime , TimephasedDataType )
em Aspose.Tasks.ResourceAssignment.GetTimephasedData(DateTime start, DateTime end, TimephasedDataType timephasedType)
em Aspose.Tasks.ResourceAssignment.get_TimephasedData()
em Aspose.Tasks.ResourceAssignment. (DateTime , DateTime , TimephasedDataType )
em Aspose.Tasks.ResourceAssignment. (DateTime )
em Aspose.Tasks.ResourceAssignment. ()
em . (ResourceAssignment )
em . (ResourceAssignment , Double )
em . (ResourceAssignment , Double )
em . (ResourceAssignment , Double )
em . (ResourceAssignment , Double )
em . (ResourceAssignment , Double )
em Aspose.Tasks.ResourceAssignmentCollection.Add(Task task, Resource resource, Double units)
em RM.Prj.Sincronismo.Aspose.PrjPersistirInsumoRelacSbc1.DoSaveContext(TContext context) na c:\RM\Requisitos\Prj-SincTOPProject\Prj-Projetos\RM.Prj.Sincronismo.Service\Sincronismo\Aspose\Subscriber\PrjPersistirInsumoRelacSbc.cs:linha 51</div><div> em RM.Lib.Subscriber.RMSSubscriber
1.SaveContext(TContext context)
em RM.Lib.Subscriber.RMSSubscriberController2.DoSaveSubscriber(List
1 list)