Jeff,
>I then tried
> Employee.IsChanged(Employee.DataSet.Tables[0])
>and it returned true. It seems that the IsChanged() is pointing at the wrong table.
>
>I then realized that the CurrentTableName had probably changed (it had) so I set it back to 'Employees'. Employees.IsChanged() still returned false;
>
>However, if I tried
> Employee.IsChanged(Employee.DataSet.Tables[Employee.CurrentTableName])
>it returns true.
Override the IsChanged() method in ABusinessObject and add this code--let me know if this addresses the problem:
public override bool IsChanged()
{
bool HasChanges = false;
DataSet ds = this.GetCurrentDataSet();
if (ds != null)
{
foreach (DataTable dt in ds.Tables)
{
HasChanges = this.IsChanged(dt);
if (HasChanges)
{
break;
}
}
}
if (!HasChanges)
{
foreach (mmBusinessObject BizObj in this.RefBizObj)
{
HasChanges = BizObj.IsChanged();
if (HasChanges)
{
break;
}
}
}
return HasChanges;
}
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com