/// <summary>
        /// Method to initailize the tab pages for the property sheet
        /// </summary>
        private void InitializePages()
        {
            MPPage page = null;

            if (ADUCPage.ADObjectType == "user")
            {
                page = new UserMultiselectGeneralEditPage(this);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "General", "General"),
                             MPMenu.POSITION_BEGINING
                             );

                page = new MultiItemsAddressEditPage(this, true);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "Address", "Address"),
                             MPMenu.POSITION_BEGINING
                             );
            }
            else if (ADUCPage.ADObjectType == "group")
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "General", "General"),
                             MPMenu.POSITION_BEGINING
                             );
            }
            else if (ADUCPage.ADObjectType == "organizationalUnit")
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "General", "General"),
                             MPMenu.POSITION_BEGINING
                             );
            }
            else
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "General", "General"),
                             MPMenu.POSITION_BEGINING
                             );
            }
        }
        /// <summary>
        /// Method to initailize the tab pages for the property sheet
        /// </summary>
        private void InitializePages()
        {
            MPPage page = null;

            if (ADUCPage.ADObjectType == "user")
            {
                page = new UserMultiselectGeneralEditPage(this);
                this.AddPage(page,
                new MPMenuItem(page.PageID, "General", "General"),
                MPMenu.POSITION_BEGINING
                );

                page = new MultiItemsAddressEditPage(this, true);
                this.AddPage(page,
                new MPMenuItem(page.PageID, "Address", "Address"),
                MPMenu.POSITION_BEGINING
                );
            }
            else if (ADUCPage.ADObjectType == "group")
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                new MPMenuItem(page.PageID, "General", "General"),
                MPMenu.POSITION_BEGINING
                );
            }
            else if (ADUCPage.ADObjectType == "organizationalUnit")
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                new MPMenuItem(page.PageID, "General", "General"),
                MPMenu.POSITION_BEGINING
                );
            }
            else
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                new MPMenuItem(page.PageID, "General", "General"),
                MPMenu.POSITION_BEGINING
                );
            }
        }
        /// <summary>
        /// Method to call the Apply functionality for each of tab pages of type MPage.
        /// </summary>
        /// <param name="actionCause"></param>
        /// <returns></returns>
        protected override bool Apply(EditDialogAction actionCause)
        {
            if (Applied && !bDataWasChanged)
            {
                return(true);
            }
            //bool b = base.Apply(actionCause);
            foreach (MPPage page in this.GetPages())
            {
                if (page != null)
                {
                    IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;

                    if (page.PageID.Trim().Equals("UserMultiSelectProperities"))
                    {
                        UserMultiselectGeneralEditPage _editPage = (UserMultiselectGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("UserMultiSelectAddressProperities"))
                    {
                        MultiItemsAddressEditPage _editPage = (MultiItemsAddressEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("MultiItemsGeneralEditPage"))
                    {
                        MultiItemsGeneralEditPage _editPage = (MultiItemsGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                }
            }
            Applied = true;
            return(true);
        }