예제 #1
0
    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);
    }
예제 #2
0
파일: Share.aspx.cs 프로젝트: a532367171/WC
    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;
    }
예제 #3
0
    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;
    }
예제 #4
0
    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);
    }
예제 #5
0
        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;
        }
예제 #6
0
        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;
        }
예제 #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _cmdCtrl = FindControl("CommandCtrl") as CommandCtrl;
     _cmdCtrl.OnCommand += new CommandCtrl.OnCommandDelegate(cmdCtrl_OnCommand);
 }
예제 #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _cmdCtrl            = FindControl("CommandCtrl") as CommandCtrl;
     _cmdCtrl.OnCommand += new CommandCtrl.OnCommandDelegate(cmdCtrl_OnCommand);
 }
예제 #9
0
파일: Share.aspx.cs 프로젝트: cyyt/Lesktop
    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;
    }