Exemplo n.º 1
0
    protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
    {
        DeptInfos dept     = new DeptInfos();
        string    deptid   = this.TreeView1.SelectedNode.Value;
        string    deptname = this.TreeView1.SelectedNode.Text;

        ltrHiddenDeptID.Text = deptid;

        ltrTreePath_Move.Text = WebCommon.GetEstParentTreeText(TreeView1);
        ltrHiddenLevel.Text   = dept.GetDeptpathSelectLevel(int.Parse(deptid), int.Parse(Request["estterm_ref_id"]));
    }
Exemplo n.º 2
0
    protected void TreeView2_SelectedNodeChanged(object sender, EventArgs e)
    {
        DeptInfos dept     = new DeptInfos();
        string    deptid   = this.TreeView2.SelectedNode.Value;
        string    deptname = this.TreeView2.SelectedNode.Text;
        int       level    = 0;

        txtDeptMove.Text   = WebCommon.GetEstParentTreeText(TreeView2);
        txtMoveLevel.Text  = dept.GetDeptpathSelectLevel(int.Parse(deptid), int.Parse(Request["estterm_ref_id"]));
        txtMoveDeptID.Text = deptid;
    }
Exemplo n.º 3
0
    protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
    {
        DeptInfos dept     = new DeptInfos();
        string    deptid   = this.TreeView1.SelectedNode.Value;
        string    deptname = this.TreeView1.SelectedNode.Text;

        ltrHiddenDeptID.Text = deptid;
        int    est_dept_group_id = 0;
        string level             = "";
        string treepath          = "";

        treepath = WebCommon.GetEstParentTreeText(TreeView1);
        level    = dept.GetDeptpathSelectLevel(int.Parse(deptid), WebUtility.GetRequestByInt("estterm_ref_id"));

        txtSortOrder.Text = this.TreeView1.SelectedNode.ToolTip;

        string mode = WebUtility.GetRequest("mode");

        if (mode.Equals("New"))
        {
            ltrTreePath_New.Text = treepath;
            ltrHiddenLevel.Text  = level;
        }
        else if (mode.Equals("Rename"))
        {
            int edIndex = (deptname.IndexOf("<") < 0) ? deptname.Length:deptname.IndexOf("<");
            ltrTreePath_Rename.Text = treepath.Replace(deptname, "").Replace("//", "/");
            ltrHiddenLevel.Text     = level;
            txtDeptRename.Text      = deptname.Substring(0, edIndex);
        }
        else if (mode.Equals("Move"))
        {
            ltrTreePath_Move.Text = treepath;
            ltrHiddenLevel.Text   = level;
        }
        else if (mode.Equals("Remove"))
        {
            ltrTreePath_Remove.Text = treepath;
            ltrHiddenLevel.Text     = level;
        }
    }