protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e) { MicroBSC.Estimation.Dac.DeptInfos dept = new MicroBSC.Estimation.Dac.DeptInfos(); string deptid = TreeView1.SelectedNode.Value; string deptname = TreeView1.SelectedNode.Text; ltrEstDeptID.Text = deptid; int est_dept_group_id = 0; if (tdEstDeptGroup.Visible == false) { tdEstDeptGroup.Visible = true; } ltrEstDeptPath.Text = WebCommon.GetEstParentTreeText(TreeView1); ListItem listItem = ddlDeptGroup.Items.FindByValue(est_dept_group_id.ToString()); ddlDeptGroup.ClearSelection(); if (listItem != null) { listItem.Selected = true; } else { ddlDeptGroup.Items.FindByValue(Convert.ToString(0)).Selected = true; } }
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"])); }
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; }
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; } }