protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     BindingSource.OnCurrentEntitySet += delegate
     {
         _ActivityFormHelper = new ActivityFormHelper((Activity)BindingSource.Current);
     };
 }
    private void DisableMembersAndResources()
    {
        TabWorkspace ActivityTabs = PageWorkItem.Workspaces["TabControl"] as TabWorkspace;

        if (ActivityTabs != null)
        {
            foreach (TabInfo tab in ActivityTabs.Tabs)
            {
                if (tab.ID == "AddMembers")
                {
                    ActivityFormHelper.SetEnabled(tab.Content.Controls, false);
                }
                if (tab.ID == "AddResources")
                {
                    ActivityFormHelper.SetEnabled(tab.Content.Controls, false);
                }
            }
        }
    }
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        BindingSource.OnCurrentEntitySet += delegate
        {
            _ActivityFormHelper = new ActivityFormHelper((Activity)BindingSource.Current);

            if (Activity.RecurrenceState == RecurrenceState.rstOccurrence)
            {
                TabWorkspace ActivityTabs = PageWorkItem.Workspaces["TabControl"] as TabWorkspace;
                if (ActivityTabs != null)
                {
                    //Hide the Recurring tab if Activity is an Occurrence in a series.
                    ActivityTabs.Hide("RecurringActivity", true);
                }
            }
        };
    }
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     BindingSource.OnCurrentEntitySet += delegate
     {
         _ActivityFormHelper = new ActivityFormHelper((Activity)BindingSource.Current);
     };
 }
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        BindingSource.OnCurrentEntitySet += delegate
        {
            _ActivityFormHelper = new ActivityFormHelper((Activity)BindingSource.Current);

            if (Activity.RecurrenceState == RecurrenceState.rstOccurrence)
            {
                TabWorkspace ActivityTabs = PageWorkItem.Workspaces["TabControl"] as TabWorkspace;
                if (ActivityTabs != null)
                {
                    //Hide the Recurring tab if Activity is an Occurrence in a series.
                    ActivityTabs.Hide("RecurringActivity", true);
                }
            }
        };
    }