コード例 #1
0
        private void Reset()
        {
            SquadronContext.StartMonitoringExceptions();

            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                try
                {
                    int count = 0;
                    foreach (int i in ItemsList.CheckedIndices)
                    {
                        if (_permissionUtility.ResetToInherit(_selectedList[i].InternalObject as SPSecurableObject))
                        {
                            count++;
                        }
                    }

                    if (count < ItemsList.CheckedIndices.Count)
                    {
                        SquadronContext.Warn("Reset operation of some item(s) invoked errors. Please refresh & retry.");
                    }
                }
                catch (Exception ex)
                {
                    SquadronContext.HandleException(ex);
                }
                finally
                {
                    SquadronContext.StopMonitoringExceptions();
                    FooterPanel.Text = "Operation completed!";
                }
            });
        }