private void OnAfterSelected(object sender, LinkedDataSourceEventArgs e)
 {
     if (e.Index == PrimaryMember.EntityIndex)
     {
         PrimaryMember.CurrentEntity = e.Entity;
         PrimaryMember.DeepLoad();
         UpdateControl(e.Entity);
     }
 }
        private void OnAfterUpdated(object sender, LinkedDataSourceEventArgs e)
        {
            if (e.Index == PrimaryMember.EntityIndex)
            {
                PrimaryMember.CurrentEntity = e.Entity;

                if (!PrimaryMember.EnableDeepSave)
                {
                    UpdateRelationships(e.Entity);
                }
            }
        }