Hi,
I am using QDSCV in my code-behind to manage my data. In the containing class I wrote a method, that is called multiple times and uses AddNew(object) method, to add new items to the collection. When I add only one element it submits properly afterwards. But as soon as I add two or more elements the collection gets into submit mode and does not return. There is no exception but when I close and reopen the program I see that the changes have not been submitted.
This is the executed code (first AddSubscription is executed and afterwards I call SubmitSubscriptions):
Perhaps you can give me a clue how to get this working with more than one element at a time.
Best regards,
Peter Schmidt
I am using QDSCV in my code-behind to manage my data. In the containing class I wrote a method, that is called multiple times and uses AddNew(object) method, to add new items to the collection. When I add only one element it submits properly afterwards. But as soon as I add two or more elements the collection gets into submit mode and does not return. There is no exception but when I close and reopen the program I see that the changes have not been submitted.
This is the executed code (first AddSubscription is executed and afterwards I call SubmitSubscriptions):
public
void
AddSubscription(pcProject project)
{
if
(project ==
null
)
{
return
;
}
var subscription = (pcSubscription) subscriptions.AddNew();
subscription.pcUser = users.CurrentItem
as
pcUser;
subscription.pcProject = project;
}
public
void
SubmitSubscriptions()
{
subscriptions.SubmitChanges();
}
Perhaps you can give me a clue how to get this working with more than one element at a time.
Best regards,
Peter Schmidt