The steps are as simple as that so I imagine there's something else going on here, the problem is I just get back 4004, no exception anywhere etc, making it annoying to debug, I get this from the ie error window
Microsoft JScript runtime error: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.Windows.Ria.DomainOperationException: Submit operation failed. An error occurred while updating the entries. See the inner exception for details.
at System.Windows.Ria.OperationBase.Complete(Exception error)
at System.Windows.Ria.SubmitOperation.Complete(Exception error)
at System.Windows.Ria.DomainContext.CompleteSubmitChanges(IAsyncResult asyncResult)
at System.Windows.Ria.DomainContext.<>c_DisplayClassd.b_5(Object )
public void TurnPage(bool forward)
{
TurnPageForward = forward;
// If the pages are already turning then don't try and skip days, just run the animation function so it inreases the speed
if (!workBook.IsTransitioning && !IsWaitingForData)
{
IsWaitingForData = true;
workBook.SnapshotPages();
NoteCtx.SubmitChanges().Completed += (s, a) =>
{
workBook.ClearPageContents();
CurrentDate = CurrentDate.AddDays(forward ? 1 : -1);
PullNotes(CurrentDate);
};
}
else
{
workBook.BeginTurnPages(TurnPageForward);
}
}
public void PullNotes(DateTime? noteTime)
{
NoteCtx.NoteItems.Clear();
var loadOp = NoteCtx.Load(NoteCtx.GetNoteItemsForDayQuery(CurrentDate));
loadOp.Completed += new EventHandler(NotesReady);
}