コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
	{
        try
        {
            userInfo = Master.userInfo;
            hidEditorId.Value = Master.userInfo.AccountId.ToString();
            Session["accountauthoritylogin"] = Master.userInfo.Login;
            Session["accountauthorityid"] = Master.userInfo.AccountId;
            if (!Page.IsPostBack)
            {

                log.Debug("webroot_aspx_authorities_accountauthority");
                AjaxPro.Utility.RegisterTypeForAjax(typeof(webroot_aspx_authorities_accountauthority));
                bindGroupsTable();
                bindUsersInGroupTable();
            }

            TreeView1.Attributes.Add("onclick", "OnCheckBoxCheckChanged(event)");

            if (TreeView1.Nodes.Count == 0)
            {
                treeVC = new TreeViewControlEx(userInfo);
                TreeView1.Nodes.Clear();
                treeVC.TreeNodePopulate(TreeView1.Nodes);
                TreeView1.PathSeparator = ("|").ToCharArray()[0];
            }
            TreeView1.ExpandAll();
        }
        catch (Exception ex)
        {
            //show error
            showErrorMessage(ex.Message);
            return;
        }
    }
コード例 #2
0
ファイル: editgroup.aspx.cs プロジェクト: wra222/testgit
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(webroot_aspx_authorities_editgroup));
        //log.Debug("page load");
        TreeView1.Attributes.Add("onclick", "OnCheckBoxCheckChanged(event)");

        userInfo.Login = Session["accountauthoritylogin"] as string;
        userInfo.AccountId = (long) Session["accountauthorityid"];

        if (TreeView1.Nodes.Count == 0)
        {
            treeVC = new TreeViewControlEx(userInfo);
            TreeView1.Nodes.Clear();
            treeVC.TreeNodePopulate(TreeView1.Nodes);
            TreeView1.PathSeparator = ("|").ToCharArray()[0];
        }
        TreeView1.ExpandAll();

        if (!IsPostBack)
        {
            //TreeView1.Nodes[0].Text = portalName;
        }
    }