My basic question is how can I set a breakpoint on my businessbase MarkOld method to see that it gets called by the simpledataportal on the server?
My issue is after saving a list of businessbase objects that have been edited in a datagridview, that my list is still showing IsDirty = True.
Any help would be much appreciated.
Nick
P.S. I saw another post where Rocky mentioned using the bindingsource EndEdit call prior to saving to the DB, but that hasn't helped. Here's my code for save button click:
If Not mSuppliers.IsDirty ThenMainForm.StatusLabel.Text =
"Already saved." Exit Sub End If Me.SupplierListBindingSource.RaiseListChangedEvents = False Me.SupplierListBindingSource.EndEdit() Dim temp As SupplierList = mSuppliers.Clone Try Using busy As StatusBusy = New StatusBusy("Saving Supplier List...") Me.SupplierListBindingSource.DataSource = NothingmSuppliers = temp.Save
Me.SupplierListBindingSource.DataSource = mSuppliers End UsingMainForm.StatusLabel.Text =
"Last Saved " & Now.ToString Catch ex As Csla.DataPortalExceptionMessageBox.Show(ex.BusinessException.ToString,
"Error Saving", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) Catch ex As ExceptionMessageBox.Show(ex.ToString,
"Error Saving", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) Finally Me.SupplierListBindingSource.RaiseListChangedEvents = True End TryI apologize, this is the code for saving my list to the dataporal, seeing rocky's notes in the book that distinguish between local and remote portal saving.
Nick
----
If Not mSuppliers.IsDirty ThenMainForm.StatusLabel.Text =
"Already saved." Exit Sub End If Me.SupplierListBindingSource.EndEdit() Me.SupplierListBindingSource.RaiseListChangedEvents = False Try Using busy As StatusBusy = New StatusBusy("Saving Supplier List...")mSuppliers = mSuppliers.Save
End UsingMainForm.StatusLabel.Text =
"Last Saved " & Now.ToString Catch ex As Csla.DataPortalExceptionMessageBox.Show(ex.BusinessException.ToString,
"Error Saving", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) Catch ex As ExceptionMessageBox.Show(ex.ToString,
"Error Saving", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) Finally Me.SupplierListBindingSource.RaiseListChangedEvents = True End TryCopyright (c) Marimer LLC