Пример #1
0
        protected override bool Apply(EditDialogAction actionCause)
        {
            bool b = base.Apply(actionCause);

            if (b)
            {
                try
                {
                    if (userMemberOf.Visible)
                    {
                        editUserPage.Description = userMemberOf.Description;
                    }
                    else
                    {
                        userMemberOf.Description = editUserPage.Description;
                    }

                    LUGPage lup = (LUGPage)this.ParentPage;
                    lup.EditLUG(this);

                    userMemberOf.ApplyMembers();
                }
                catch (Exception e)
                {
                    b = false;
                    Logger.LogException("UserPropertiesDlg.Apply", e);
                }
            }


            return(b);
        }
    protected override bool Apply(EditDialogAction actionCause)
    {
        bool b = base.Apply(actionCause);
        
        if (b)
        {
            try
            {
                
                LUGPage lup = (LUGPage)this.ParentPage;
                lup.EditLUG(this);
                
                groupPropertiesPage.ApplyMembers();
                
            }
            catch (Exception e)
            {
                b = false;
                Logger.LogException("GroupPropertiesDlg.Apply", e);
            }
        }


        return b;
    }
Пример #3
0
        /// <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);
            }

            foreach (MPPage page in this.GetPages())
            {
                if (page != null)
                {
                    IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;
                    if (page.PageID.Trim().Equals("ShareGeneralEditPage"))
                    {
                        ShareGeneralEditPage _editPage = (ShareGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                }
            }

            Applied = true;
            return(true);
        }
Пример #4
0
        /// <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)
                {
                    if (page.PageID.Trim().Equals("EditProperitiesAdvanced"))
                    {
                        ADEditPage _editPage = (ADEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("ContainerGeneralEditProperities"))
                    {
                        ContainerGeneralEditPage _editPage = (ContainerGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                }
            }
            Applied = true;
            return(true);
        }
Пример #5
0
        /// <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);
            }

            foreach (MPPage page in this.GetPages())
            {
                if (page != null)
                {
                    IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;
                    if (page.PageID.Trim().Equals("EditProperitiesAdvanced"))
                    {
                        ADEditPage _editPage = (ADEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("GroupMemofEditProperities"))
                    {
                        GroupMemOfPage _groupMemPage = (GroupMemOfPage)page;
                        if (!_groupMemPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("GroupMembersEditProperities"))
                    {
                        GroupMembersPage _groupMemsPage = (GroupMembersPage)page;
                        if (!_groupMemsPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("GroupGeneralEditProperities"))
                    {
                        GroupGeneralEditPage _editPage = (GroupGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("BuiltinGroupGeneralEditProperities"))
                    {
                        BuiltinGroupGeneralEditPage _editPage = (BuiltinGroupGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                }
            }
            Applied = true;
            return(true);
        }
Пример #6
0
        protected override bool Apply(EditDialogAction actionCause)
        {
            uint   result       = (uint)LUGAPI.WinError.ERROR_SUCCESS;
            string errorMessage = null;

            try
            {
                if (!Hostinfo.ValidatePassword(tbConfirmPassword.Text, tbPassword.Text, out errorMessage))
                {
                    if (!(tbConfirmPassword.Text.Trim().Equals(tbPassword.Text)))
                    {
                        errorMessage = "The password was not correctly confirmed. Please ensure that the password and confirmation match exactly";
                    }
                    container.ShowError(errorMessage, MessageBoxButtons.OK);
                    return(false);
                }

                Password     = tbPassword.Text;
                User         = tbUserName.Text;
                FullName     = tbFullName.Text;
                Description  = tbDescription.Text;
                CannotChange = cbCannotChange.Checked;
                MustChange   = cbMustChange.Checked;
                NeverExpires = cbNeverExpires.Checked;
                IsDisabled   = cbIsDisabled.Checked;

                LUGPage lugPg = localParent;

                if (lugPg == null)
                {
                    Logger.Log("NewUserDlg.Apply  localParent == null", Logger.LogLevel.Error);
                    return(false);
                }

                result = lugPg.AddLUG(this);

                if (result != (uint)LUGAPI.WinError.ERROR_SUCCESS)
                {
                    container.ShowError(
                        "Likewise Administrative Console encountered an error when trying to add a new user.  " + ErrorCodes.WIN32String((int)result),
                        MessageBoxButtons.OK);
                    return(false);
                }
            }
            catch (Exception e)
            {
                Logger.LogException("NewUserDlg.Apply", e);
            }

            return(true);
        }
        /// <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);
        }
Пример #8
0
        /// <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)
        {
            //bool b = base.Apply(actionCause);
            bool retVal = false;

            Applied = true;

            foreach (MPPage page in this.GetPages())
            {
                if (page != null)
                {
                    IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;
                    if (page.PageID.Trim().Equals("LogProperities"))
                    {
                        LogPropertiesPage _logPage = (LogPropertiesPage)page;
                        if (_logPage.OnOkApply())
                        {
                            retVal = true;
                        }
                        else
                        {
                            retVal = true;
                        }
                    }
                    if (page.PageID.Trim().Equals("FilterProperities"))
                    {
                        EventFilterControl _filterControl = (EventFilterControl)page;
                        if (_filterControl.OnOkApply())
                        {
                            retVal = true;
                        }
                        else
                        {
                            retVal = false;
                        }
                    }
                }
            }

            return(retVal);
        }
Пример #9
0
        protected override bool Apply(EditDialogAction actionCause)
        {
            if (Applied && !bDataWasChanged)
            {
                return(true);
            }

            bool bRet = true;

            try
            {
                uint result = localParent.AddLUG(this);
                if (result != (uint)LUGAPI.WinError.ERROR_SUCCESS)
                {
                    container.ShowError(
                        "Likewise Administrative Console encountered an error when trying to add a new group.  " + ErrorCodes.WIN32String((int)result),
                        MessageBoxButtons.OK);
                    bDataWasChanged = true;
                    return(false);
                }
                Hostinfo hn = localParent.GetContext() as Hostinfo;

                bRet = bRet && hn != null && hn.creds != null &&
                       ProcessMembers(hn.creds, localParent.GetDomain());
            }
            catch (Exception e)
            {
                bRet = false;
                Logger.LogException("NewGroupDlg.Apply", e);
            }

            if (bRet)
            {
                Applied = true;
                Close();
            }

            return(bRet);
        }
Пример #10
0
 /// <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)
 {
     foreach (MPPage page in this.GetPages())
     {
         if (page != null)
         {
             IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;
             if (page.PageID.Trim().Equals("ObjectAddAttributesTab"))
             {
                 ObjectAddAttributesTab _AddAttributesPage = (ObjectAddAttributesTab)page;
                 if (_AddAttributesPage.OnApply())
                 {
                     return(true);
                 }
                 else
                 {
                     return(false);
                 }
             }
         }
     }
     return(true);
 }
Пример #11
0
        protected override bool Apply(EditDialogAction actionCause)
        {
            bool b = base.Apply(actionCause);

            if (b)
            {
                try
                {
                    LUGPage lup = (LUGPage)this.ParentPage;
                    lup.EditLUG(this);

                    groupPropertiesPage.ApplyMembers();
                }
                catch (Exception e)
                {
                    b = false;
                    Logger.LogException("GroupPropertiesDlg.Apply", e);
                }
            }


            return(b);
        }
Пример #12
0
 /// <summary>
 /// Override this in subclass to validate all the dialog data.
 /// </summary>
 /// <param name="actionCause">indicates the action causing data to be validated</param>
 protected virtual bool ValidateAllData(EditDialogAction actionCause)
 {
     // do nothing
     return(true);
 }
Пример #13
0
    protected override bool Apply(EditDialogAction actionCause)
    {
        if (Applied && !bDataWasChanged)
        {
            return true;
        }

        bool bRet = true;
        try
        {
            uint result = localParent.AddLUG(this);
            if (result != (uint)LUGAPI.WinError.ERROR_SUCCESS)
            {
                container.ShowError(
                "Likewise Administrative Console encountered an error when trying to add a new group.  " + ErrorCodes.WIN32String((int)result),
                MessageBoxButtons.OK);
                bDataWasChanged = true;
                return false;
            }
            Hostinfo hn = localParent.GetContext() as Hostinfo;

            bRet = bRet && hn != null && hn.creds != null &&
                   ProcessMembers(hn.creds, localParent.GetDomain());
        }
        catch (Exception e)
        {            
            bRet = false;
            Logger.LogException("NewGroupDlg.Apply", e);
        }
        
        if (bRet)
        {
            Applied = true;
            Close();
        }
       
        return bRet;
    }
Пример #14
0
    protected override bool Apply(EditDialogAction actionCause)
    {
        uint result = (uint)LUGAPI.WinError.ERROR_SUCCESS;
        string errorMessage = null;
        try
        {
            if (!Hostinfo.ValidatePassword(tbConfirmPassword.Text, tbPassword.Text, out errorMessage))
            {
                if (!(tbConfirmPassword.Text.Trim().Equals(tbPassword.Text)))
                    errorMessage = "The password was not correctly confirmed. Please ensure that the password and confirmation match exactly";
                container.ShowError(errorMessage, MessageBoxButtons.OK);
                return false;
            }

            Password = tbPassword.Text;
            User = tbUserName.Text;
            FullName = tbFullName.Text;
            Description = tbDescription.Text;
            CannotChange = cbCannotChange.Checked;
            MustChange = cbMustChange.Checked;
            NeverExpires = cbNeverExpires.Checked;
            IsDisabled = cbIsDisabled.Checked;
            
            LUGPage lugPg = localParent;
            
            if (lugPg == null)
            {
                Logger.Log("NewUserDlg.Apply  localParent == null", Logger.LogLevel.Error);
                return false;
            }

            result = lugPg.AddLUG(this);

            if (result != (uint)LUGAPI.WinError.ERROR_SUCCESS)
            {
                container.ShowError(
                "Likewise Administrative Console encountered an error when trying to add a new user.  " + ErrorCodes.WIN32String((int)result),
                MessageBoxButtons.OK);
                return false;
            }
        }
        catch (Exception e)
        {
            Logger.LogException("NewUserDlg.Apply", e);
        }
        
        return true;
    }
Пример #15
0
 /// <summary>
 /// Override this in subclass to validate all the dialog data.
 /// </summary>
 /// <param name="actionCause">indicates the action causing data to be validated</param>
 protected virtual bool ValidateAllData(EditDialogAction actionCause)
 {
     // do nothing
     return true;
 }
        /// <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);
            ICollection pages = this.GetPages();

            foreach (MPPage page in pages)
            {
                if (page != null)
                {
                    IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;
                    if (page.PageID.Trim().Equals("EditProperitiesAdvanced"))
                    {
                        ADEditPage _editPage = (ADEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return false;
                        }
                    }
                    if (page.PageID.Trim().Equals("UserMemofEditProperities"))
                    {
                        UserMemOfPage _userMemPage = (UserMemOfPage)page;
                        if (!_userMemPage.OnApply())
                        {
                            return false;
                        }
                    }
                    if (page.PageID.Trim().Equals("UserGeneralEditProperities"))
                    {
                        UserGeneralEditPage _editPage = (UserGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return false;
                        }
                    }

                    if (page.PageID.Trim().Equals("UserAccountPage"))
                    {
                        UserAccountPage _accountPage = (UserAccountPage)page;
                        if (!_accountPage.OnApply())
                        {
                            return false;
                        }
                    }

                    if (page.PageID.Trim().Equals("UserProfilePage"))
                    {
                        UserProfilePage _profilePage = (UserProfilePage)page;
                        if (!_profilePage.OnApply())
                        {
                            return false;
                        }
                    }

                    if (page.PageID.Trim().Equals("UserMultiSelectAddressProperities"))
                    {
                        MultiItemsAddressEditPage _editPage = (MultiItemsAddressEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return false;
                        }
                    }
                }
            }
            Applied = true;
            return true;
        }
Пример #17
0
 /// <summary>
 /// Override this in subclass to write dialog data to persistent storage.
 /// NOTE: there is no separate method for OK. Clicking either OK or Apply buttons
 /// will cause this method to be called, but only if dialog is free of errors and
 /// data was modified. The actionCause parameter will be set to
 /// ACTION_OK or ACTION_APPLY accordingly.
 /// </summary>
 /// <param name="actionCause">indicates the action causing data to be validated</param>
 /// <returns></returns>
 protected virtual bool Apply(EditDialogAction actionCause)
 {
     // do nothing
     return true;
 }
Пример #18
0
    protected override bool Apply(EditDialogAction actionCause)
    {
        bool b = base.Apply(actionCause);
        
        if (b)
        {
            try
            {
                if (userMemberOf.Visible)
                {
                    editUserPage.Description = userMemberOf.Description;
                }
                else
                {
                    userMemberOf.Description = editUserPage.Description;
                }
                
                LUGPage lup = (LUGPage)this.ParentPage;
                lup.EditLUG(this);
                
                userMemberOf.ApplyMembers();
                
            }
            catch(Exception e)
            {
                b = false;
                Logger.LogException("UserPropertiesDlg.Apply", e);
            }
        }


        return b;
    }
        /// <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;
        }
Пример #20
0
    /// <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)
    {
        //bool b = base.Apply(actionCause);
        bool retVal = false;

        Applied = true;

        foreach (MPPage page in this.GetPages())
        {
            if (page != null)
            {
                IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;
                if (page.PageID.Trim().Equals("LogProperities"))
                {
                    LogPropertiesPage _logPage = (LogPropertiesPage)page;
                    if (_logPage.OnOkApply())
                    {
                        retVal = true;
                    }
                    else
                    {
                        retVal = true;
                    }
                }
                if (page.PageID.Trim().Equals("FilterProperities"))
                {
                    EventFilterControl _filterControl = (EventFilterControl)page;
                    if (_filterControl.OnOkApply())
                    {
                        retVal = true;
                    }
                    else
                    {
                        retVal = false;
                    }
                }
            }
        }

        return retVal;
    }
        /// <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;
            }

            foreach (MPPage page in this.GetPages())
            {
                if (page != null)
                {
                    IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;
                    if (page.PageID.Trim().Equals("ShareGeneralEditPage"))
                    {
                        ShareGeneralEditPage _editPage = (ShareGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return false;
                        }
                    }
                }
            }

            Applied = true;
            return true;
        }
 /// <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)
 {
     foreach (MPPage page in this.GetPages())
     {
         if (page != null)
         {
             IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;
             if (page.PageID.Trim().Equals("ObjectAddAttributesTab"))
             {
                 ObjectAddAttributesTab _AddAttributesPage = (ObjectAddAttributesTab)page;
                 if (_AddAttributesPage.OnApply())
                 {
                     return true;
                 }
                 else
                 {
                     return false;
                 }
             }
         }
     }
     return true;
 }
Пример #23
0
 /// <summary>
 /// Override this in subclass to write dialog data to persistent storage.
 /// NOTE: there is no separate method for OK. Clicking either OK or Apply buttons
 /// will cause this method to be called, but only if dialog is free of errors and
 /// data was modified. The actionCause parameter will be set to
 /// ACTION_OK or ACTION_APPLY accordingly.
 /// </summary>
 /// <param name="actionCause">indicates the action causing data to be validated</param>
 /// <returns></returns>
 protected virtual bool Apply(EditDialogAction actionCause)
 {
     // do nothing
     return(true);
 }
Пример #24
0
 /// <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("OUGeneralEditProperities"))
             {
                 OUGeneralEditPage _editPage = (OUGeneralEditPage)page;
                 if (!_editPage.OnApply())
                 {
                     return false;
                 }
             }
             if (page.PageID.Trim().Equals("EditProperitiesAdvanced"))
             {
                 ADEditPage _editPage = (ADEditPage)page;
                 if (!_editPage.OnApply())
                 {
                     return false;
                 }
             }                
         }
     }
     Applied = true;
     return true;
 }
 /// <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;
     }        
     
     foreach (MPPage page in this.GetPages())
     {
         if (page != null)
         {
             IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;
             if (page.PageID.Trim().Equals("EditProperitiesAdvanced"))
             {
                 ADEditPage _editPage = (ADEditPage)page;
                 if (!_editPage.OnApply())
                 {
                     return false;
                 }
             }               
             if (page.PageID.Trim().Equals("GroupMemofEditProperities"))
             {
                 GroupMemOfPage _groupMemPage = (GroupMemOfPage)page;
                 if (!_groupMemPage.OnApply())
                 {
                     return false;
                 }
             }
             if (page.PageID.Trim().Equals("GroupMembersEditProperities"))
             {
                 GroupMembersPage _groupMemsPage = (GroupMembersPage)page;
                 if (!_groupMemsPage.OnApply())
                 {
                     return false;
                 }
             }
             if (page.PageID.Trim().Equals("GroupGeneralEditProperities"))
             {
                 GroupGeneralEditPage _editPage = (GroupGeneralEditPage)page;
                 if (!_editPage.OnApply())
                 {
                     return false;
                 }
             }
             if (page.PageID.Trim().Equals("BuiltinGroupGeneralEditProperities"))
             {
                 BuiltinGroupGeneralEditPage _editPage = (BuiltinGroupGeneralEditPage)page;
                 if (!_editPage.OnApply())
                 {
                     return false;
                 }
             }
         }
     }
     Applied = true;
     return true;
 }
Пример #26
0
        /// <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);
            ICollection pages = this.GetPages();

            foreach (MPPage page in pages)
            {
                if (page != null)
                {
                    IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;
                    if (page.PageID.Trim().Equals("EditProperitiesAdvanced"))
                    {
                        ADEditPage _editPage = (ADEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("UserMemofEditProperities"))
                    {
                        UserMemOfPage _userMemPage = (UserMemOfPage)page;
                        if (!_userMemPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("UserGeneralEditProperities"))
                    {
                        UserGeneralEditPage _editPage = (UserGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }

                    if (page.PageID.Trim().Equals("UserAccountPage"))
                    {
                        UserAccountPage _accountPage = (UserAccountPage)page;
                        if (!_accountPage.OnApply())
                        {
                            return(false);
                        }
                    }

                    if (page.PageID.Trim().Equals("UserProfilePage"))
                    {
                        UserProfilePage _profilePage = (UserProfilePage)page;
                        if (!_profilePage.OnApply())
                        {
                            return(false);
                        }
                    }

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