protected void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        if (!this.IsPostBack)
        {
            PageUtility.SetContentTitle(this, "职务权限设置");
            this.Page.Title = "职务权限设置";

            int opViewId   = BusinessUtility.GetBusinessOperateId(SystemEnums.UseCase.PositionAuthorization, SystemEnums.OperateEnum.View);
            int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.UseCase.PositionAuthorization, SystemEnums.OperateEnum.Manage);
            AuthorizationDS.PositionRow position         = (AuthorizationDS.PositionRow) this.Session["Position"];
            PositionRightBLL            positionRightBLL = new PositionRightBLL();
            bool hasViewRight   = positionRightBLL.CheckPositionRight(position.PositionId, opViewId);
            bool hasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId);

            if (!hasViewRight && !hasManageRight)
            {
                Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx");
                return;
            }
            if (!hasManageRight)
            {
                this.SetPositionRightBtn.Visible = false;
            }

            OUTreeUtility.InitOUTree(this.OrganizationTreeView, true, false, false, false, true, false);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     base.Page_Load(sender, e);
     if (!this.IsPostBack)
     {
         OUTreeUtility.InitOUTree(this.OUTree, false, false, false, true, false, true);
         if (Request["OUId"] != null)
         {
             PageUtility.SelectTreeNodeByNodeValue(this.OUTree, "OU" + Request["OUId"]);
         }
     }
 }