default.aspx.cs
来自「在编写管理信统软件中,您是否对于繁琐的多用户权限管理而头痛?需要对不同的用户设置」· CS 代码 · 共 43 行
CS
43 行
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Admin_Modules_ChangeMyPwd_Default : System.Web.UI.Page
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(Admin_Modules_ChangeMyPwd_Default));
protected void Page_Load(object sender, EventArgs e)
{
try
{
SessionUtil.SavaModuleTag("ChangeMyPwd");
if(SessionUtil.GetStaffSession().IsInnerUser == 0)
{
PermissionUtil.SaveGrantPermissionsToSession();
if(!PermissionUtil.HasGrantPermission("rights_browse")) throw new ModuleSecurityException("无权限访问此模块。");
}
}
catch(MissSessionException)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "reload",
"<script type=\"text/javascript\">parent.location='../../Default.aspx';</script>");
}
catch(ModuleSecurityException)
{
Response.Redirect("../../Frameset/Welcome.aspx");
}
catch (Exception ex)
{
log.Error(null, ex);
throw;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?