📄 defaultpermissionlist.aspx.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System;
using CommunityServer.Components;
using CommunityServer.ControlPanel.Controls;
using CommunityServer.ControlPanel.UI;
using CommunityServer.Controls;
using ResourceControl = CommunityServer.ControlPanel.Controls.ResourceControl;
using ResourceLinkButton = CommunityServer.ControlPanel.Controls.ResourceLinkButton;
namespace CommunityServer.ControlPanel.PhotoAdmin
{
/// <summary>
/// Summary description for DefaultPermissionList.
/// </summary>
public class DefaultPermissionList : BaseGalleryAdminPage
{
#region Child Controls
protected MPContent DescriptionRegion;
protected MPContent TaskRegion;
protected ResourceControl SectionDescription;
protected ResourceControl Section_Sub_Description;
protected ResourceLinkButton Save;
protected ResourceLinkButton resetPermissions;
protected ResourceControl Resourcecontrol1;
protected ControlPanelSelectedNavigation SelectedNavigation1;
protected MPContainer Mpcontainer1;
#endregion
protected DefaultPermissionListControl DefaultPermissionListControl1;
private void Page_Load(object sender, EventArgs e)
{
resetPermissions.Attributes.Add("onclick", string.Format("return confirm('{0}');", Components.ResourceManager.GetString("CP_PhotosAdmin_DefaultPermissionsList_ResetPermissions_Warning")));
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
this.resetPermissions.Click += new EventHandler(this.resetPermissions_Click);
this.Save.Click +=new EventHandler(Save_Click);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new EventHandler(this.Page_Load);
}
#endregion
private void Save_Click(object sender, EventArgs e)
{
DefaultPermissionListControl1.Save();
Response.Redirect(Request.RawUrl);
}
private void resetPermissions_Click(object sender, EventArgs e)
{
if(!CSContext.Current.User.IsAdministrator)
throw new CSException(CSExceptionType.AdministrationAccessDenied);
DefaultPermissionListControl1.ResetPermissions();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -