Strings: Return Alternate On Null/Set Null On Alternate(reference type) -- String.Empty
Integers: Return Alternate On Null/Set Null On Alternate(value type) -- 0
DateTime: Return Alternate On Null/Set Null On Alternate(reference type) -- #1/1/1800#
The getting/setting of the values works fine but is that what is causing the BO to be flagged as dirty when a new record is added? If so, how do I get around this problem? I have a simple data entry app that clears the BO on each successful BO.Save and then adds a new record using BO.Add. When the user closes the app, they're always prompted with the "Save Changes" message dialog since the BO is flagged as dirty.
Thanks!!
Here's some code I placed in the FormClosing event:
Evaluations.CurrentRow.Item(ix, Data.DataRowVersion.Current) Then
isDirty =
dlgResult = MessageBox.Show(
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button3)
Select Case dlgResult
Case Windows.Forms.DialogResult.Cancel
e.Cancel = True
e.Cancel =
This seems to work but is this a proper way of getting what I need or am I opening myself up for future problems?
No, I think you are good.