protected void Page_Load(object sender, EventArgs e) { AccountInfo cu = ServerImpl.Instance.GetCurrentUser(Context); if (cu == null || cu.ID != AccountImpl.AdminID) throw new Exception("你没有权限访问该页面!"); _cmdCtrl = FindControl("CommandCtrl") as CommandCtrl; _cmdCtrl.OnCommand += new CommandCtrl.OnCommandDelegate(cmdCtrl_OnCommand); }
protected void Page_Load(object sender, EventArgs e) { _cmdCtrl = FindControl("CommandCtrl") as CommandCtrl; _cmdCtrl.OnCommand += new CommandCtrl.OnCommandDelegate(cmdCtrl_OnCommand); //FindControl("PlaceHolder1").Visible = CurrentUser.IsAdmin; _cmdCtrl.State["Action"] = null; }
protected void Page_Load(object sender, EventArgs e) { CommandCtrl cmdCtrl = FindControl("CommandCtrl") as CommandCtrl; cmdCtrl.OnCommand += new CommandCtrl.OnCommandDelegate(cmdCtrl_OnCommand); cmdCtrl.State["Action"] = null; }
protected void Page_Load(object sender, EventArgs e) { AccountInfo cu = ServerImpl.Instance.GetCurrentUser(Context); if (cu == null || cu.ID != AccountImpl.AdminID) { throw new Exception("你没有权限访问该页面!"); } _cmdCtrl = FindControl("CommandCtrl") as CommandCtrl; _cmdCtrl.OnCommand += new CommandCtrl.OnCommandDelegate(cmdCtrl_OnCommand); }
protected void Page_Load(object sender, EventArgs e) { _currentPage = Request.QueryString["CurrentPage"] == null ? 1 : Convert.ToInt32(Request.QueryString["CurrentPage"]); _isTemp = Request.QueryString["IsTemp"] == null ? 0 : Convert.ToInt32(Request.QueryString["IsTemp"]); AccountInfo cu = ServerImpl.Instance.GetCurrentUser(Context); if (cu == null || !cu.IsAdmin) throw new Exception("你没有权限访问该页面!"); _cmdCtrl = FindControl("CommandCtrl") as CommandCtrl; _cmdCtrl.OnCommand += new CommandCtrl.OnCommandDelegate(cmdCtrl_OnCommand); _cmdCtrl.State["Action"] = null; }
protected void Page_Load(object sender, EventArgs e) { _groupID = Convert.ToInt32(Request.QueryString["GroupID"]); AccountInfo groupInfo = Core.AccountImpl.Instance.GetUserInfo(_groupID); AccountInfo cu = ServerImpl.Instance.GetCurrentUser(Context); if (!(cu != null && (cu.IsAdmin || groupInfo.Type == 1 && cu.ID == groupInfo.Creator))) { throw new Exception("你没有权限访问该页面!"); } _cmdCtrl = FindControl("CommandCtrl") as CommandCtrl; _cmdCtrl.OnCommand += new CommandCtrl.OnCommandDelegate(cmdCtrl_OnCommand); _cmdCtrl.State["Action"] = null; var bottom_ope = FindControl("BottomOpe"); if (bottom_ope != null) bottom_ope.Visible = cu.IsAdmin; }
protected void Page_Load(object sender, EventArgs e) { _cmdCtrl = FindControl("CommandCtrl") as CommandCtrl; _cmdCtrl.OnCommand += new CommandCtrl.OnCommandDelegate(cmdCtrl_OnCommand); }