// test #region 초기 세팅 메소드 #endregion #region 내부 함수 public void setKpiData() { if (ddlEstTermInfo.Items.Count < 1) { PageUtility.AlertMessage("등록된 평가기간이 없습니다."); return; } string iresult_input_method = ""; string ikpi_code = ""; string ikpi_name = ""; string iemp_name = ""; int ilogin_id = int.Parse(gUserInfo.Emp_Ref_ID.ToString()); string ikpi_group_ref_id = ""; this.SetParameter(); MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi objKpi = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi(); DataSet ds = objKpi.GetKpiListPerEstDept(this.IEstTermRefID, this.IEstDeptRefID, this.IYmd, iresult_input_method, ikpi_code, ikpi_name, iemp_name, ikpi_group_ref_id); ugrdMoonChart.Visible = true; ugrdMoonChart.Clear(); lblCountRow.Text = "Total Rows : " + ugrdMoonChart.Rows.Count.ToString(); }
public void setKpiData() { if (ddlEstTermInfo.Items.Count < 1) { PageUtility.AlertMessage("등록된 평가기간이 없습니다."); return; } string iresult_input_method = ddlResultInput.SelectedValue; string ikpi_code = txtKPICode.Text.Trim(); string ikpi_name = txtKPIName.Text.Trim(); string iemp_name = txtChamName.Text.Trim(); int ilogin_id = int.Parse(gUserInfo.Emp_Ref_ID.ToString()); string ikpi_group_ref_id = PageUtility.GetByValueDropDownList(ddlKpiGroupRefID); this.IEstTermRefID = PageUtility.GetIntByValueDropDownList(ddlEstTermInfo); this.IEstDeptRefID = PageUtility.GetIntByValueDropDownList(ddlEstDept); this.IYmd = PageUtility.GetByValueDropDownList(ddlEstTermMonth); string ikpi_use_yn = "Y"; MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi objKpi = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi(); DataSet ds = objKpi.GetKpiListPerEstDept2(this.IEstTermRefID, this.IEstDeptRefID, this.IYmd, iresult_input_method, ikpi_code, ikpi_name, iemp_name, ikpi_group_ref_id, ikpi_use_yn); ugrdMapKpi.Visible = true; ugrdMoonChartForPrint.Visible = false; ugrdMoonChartForPrint.Clear(); ugrdMapKpi.Clear(); ugrdMapKpi.DataSource = ds; ugrdMapKpi.DataBind(); lblRowCount.Text = ugrdMapKpi.Rows.Count.ToString("#,##0"); }
/// <summary> /// 전략별 KPI 리스트 조회/ KPI 총가중치 조회 /// </summary> /// <param name="isSelectAll"></param> private void SetKpi(bool isSelectAll) { int intFindKpiID = (TtxtFindKpiID.Text == "") ? 0 : int.Parse(TtxtFindKpiID.Text); string strFindKpiNM = TtxtFindKpiNM.Text; MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi objKPI = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi(); DataSet dsKPI = objKPI.GetKpiListPerStg(this.IEstTermRefID, this.IEstDeptRefID, this.IMapVersionID, int.Parse(this.ITreeSelValue)); TugrdKPIPerStg.Clear(); TugrdKPIPerStg.DataSource = dsKPI; TugrdKPIPerStg.DataBind(); TugrdKPIAll.Clear(); if (isSelectAll) { DataSet dsKPIAll = objKPI.GetAllKpiExceptDept(this.IEstTermRefID , this.IEstDeptRefID , this.IMapVersionID , intFindKpiID , strFindKpiNM , txtChampion.Text , txtMgmDept.Text); TugrdKPIAll.DataSource = dsKPIAll; TugrdKPIAll.DataBind(); } DataSet dsWeight = objKPI.GetWeightPerDept(this.IEstTermRefID, this.IEstDeptRefID, this.IYmd); if (dsWeight.Tables[0].Rows.Count > 0) { double dblWeight = double.Parse(dsWeight.Tables[0].Rows[0]["WEIGHT"].ToString()); TlblWeightTotal.ForeColor = (dblWeight != 100) ? Color.Red : Color.Blue; TlblWeightTotal.Text = Convert.ToString(Math.Round(dblWeight, 2, MidpointRounding.ToEven)); } }
private void BindBadKpiInfo() { MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi biz = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi(); DataSet ds = biz.GetBadKpiListPreviousMonth(this.IEstTermRefID, this.IEstDeptID, this.IYmd, "MS"); this.ugrdBadKPIInfo.DataSource = ds; this.ugrdBadKPIInfo.DataBind(); }
public bool TxrAllBscStgMap(DataTable iDT) { int intRow = iDT.Rows.Count; int intTxrCnt = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); MicroBSC.BSC.Biz.Biz_Bsc_Map_Stg_Parent objPrt = new Biz_Bsc_Map_Stg_Parent(); MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi objKpi = new Biz_Bsc_Map_Kpi(); try { for (int i = 0; i < intRow; i++) { if (iDT.Rows[i]["ITYPE"].ToString() == "D") { this.DeleteData(conn , trx , int.Parse(iDT.Rows[i]["ESTTERM_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["EST_DEPT_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["MAP_VERSION_ID"].ToString()) , int.Parse(iDT.Rows[i]["STG_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["VIEW_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["TXR_USER"].ToString()) ); objPrt.DeleteAllData (conn , trx , int.Parse(iDT.Rows[i]["ESTTERM_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["EST_DEPT_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["MAP_VERSION_ID"].ToString()) , int.Parse(iDT.Rows[i]["STG_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["TXR_USER"].ToString()) ); objKpi.DeleteKpiPerStgData (conn , trx , int.Parse(iDT.Rows[i]["ESTTERM_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["EST_DEPT_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["MAP_VERSION_ID"].ToString()) , int.Parse(iDT.Rows[i]["STG_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["TXR_USER"].ToString()) ); } else { this.InsertData(conn , trx , int.Parse(iDT.Rows[i]["ESTTERM_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["EST_DEPT_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["MAP_VERSION_ID"].ToString()) , int.Parse(iDT.Rows[i]["STG_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["VIEW_REF_ID"].ToString()) , int.Parse(iDT.Rows[i]["SORT_ORDER"].ToString()) , int.Parse(iDT.Rows[i]["TXR_USER"].ToString()) ); } } base.Transaction_Message = "정상적으로 처리되었습니다."; base.Transaction_Result = "Y"; trx.Commit(); } catch (Exception e) { base.Transaction_Message = e.Message; base.Transaction_Result = "N"; trx.Rollback(); return(false); } finally { conn.Close(); } return(true); }
/// <summary> /// 전략별 KPI 추가/삭제 /// </summary> /// <param name="iType"></param> private void AddDelKpi(string iType) { DataTable rDT1 = new DataTable("BSC_MAP_STG"); rDT1.Columns.Add("ITYPE", typeof(string)); rDT1.Columns.Add("ESTTERM_REF_ID", typeof(int)); rDT1.Columns.Add("EST_DEPT_REF_ID", typeof(int)); rDT1.Columns.Add("MAP_VERSION_ID", typeof(int)); rDT1.Columns.Add("STG_REF_ID", typeof(int)); rDT1.Columns.Add("KPI_REF_ID", typeof(int)); rDT1.Columns.Add("WEIGHT", typeof(double)); rDT1.Columns.Add("SORT_ORDER", typeof(int)); rDT1.Columns.Add("MAP_KPI_TYPE", typeof(string)); rDT1.Columns.Add("TXR_USER", typeof(int)); int intLogInUser = gUserInfo.Emp_Ref_ID; DataRow rDR1; CheckBox chkCheck; int intRow = (iType == "A") ? TugrdKPIAll.Rows.Count : TugrdKPIPerStg.Rows.Count; int cntKpi = TugrdKPIPerStg.Rows.Count + 1; TemplatedColumn colMKT; DropDownList ddlMKT; for (int i = 0; i < intRow; i++) { if (iType == "A") { TemplatedColumn unit_col = (TemplatedColumn)TugrdKPIAll.Columns.FromKey("selchk"); chkCheck = (CheckBox)((CellItem)unit_col.CellItems[TugrdKPIAll.Rows[i].BandIndex]).FindControl("cBox"); if (chkCheck.Checked) { rDR1 = rDT1.NewRow(); rDR1["ITYPE"] = iType; rDR1["ESTTERM_REF_ID"] = this.IEstTermRefID; rDR1["EST_DEPT_REF_ID"] = this.IEstDeptRefID; rDR1["MAP_VERSION_ID"] = this.IMapVersionID; rDR1["STG_REF_ID"] = (this.ITreeSelValue == "") ? 0 : int.Parse(this.ITreeSelValue); rDR1["KPI_REF_ID"] = (TugrdKPIAll.Rows[i].Cells.FromKey("KPI_REF_ID").Value == null) ? 0 : int.Parse(TugrdKPIAll.Rows[i].Cells.FromKey("KPI_REF_ID").Value.ToString()); rDR1["WEIGHT"] = 0; rDR1["SORT_ORDER"] = cntKpi + i; rDR1["TXR_USER"] = intLogInUser; rDT1.Rows.Add(rDR1); } } else if (iType == "D") { TemplatedColumn unit_col = (TemplatedColumn)TugrdKPIPerStg.Columns.FromKey("selchk"); chkCheck = (CheckBox)((CellItem)unit_col.CellItems[TugrdKPIPerStg.Rows[i].BandIndex]).FindControl("cBox"); if (chkCheck.Checked) { rDR1 = rDT1.NewRow(); rDR1["ITYPE"] = iType; rDR1["ESTTERM_REF_ID"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value == null) ? this.IEstTermRefID : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value.ToString()); rDR1["EST_DEPT_REF_ID"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("EST_DEPT_REF_ID").Value == null) ? this.IEstDeptRefID : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("EST_DEPT_REF_ID").Value.ToString()); rDR1["MAP_VERSION_ID"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("MAP_VERSION_ID").Value == null) ? 0 : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("MAP_VERSION_ID").Value.ToString()); rDR1["STG_REF_ID"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("STG_REF_ID").Value == null) ? 0 : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("STG_REF_ID").Value.ToString()); rDR1["KPI_REF_ID"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("KPI_REF_ID").Value == null) ? 0 : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("KPI_REF_ID").Value.ToString()); rDR1["SORT_ORDER"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("SORT_ORDER").Value == null) ? 0 : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("SORT_ORDER").Value.ToString()); rDR1["WEIGHT"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("WEIGHT").Value == null) ? 0 : double.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("WEIGHT").Value.ToString()); rDR1["TXR_USER"] = intLogInUser; rDT1.Rows.Add(rDR1); } } else if (iType == "U") { rDR1 = rDT1.NewRow(); rDR1["ITYPE"] = iType; rDR1["ESTTERM_REF_ID"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value == null) ? this.IEstTermRefID : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value.ToString()); rDR1["EST_DEPT_REF_ID"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("EST_DEPT_REF_ID").Value == null) ? this.IEstDeptRefID : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("EST_DEPT_REF_ID").Value.ToString()); rDR1["MAP_VERSION_ID"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("MAP_VERSION_ID").Value == null) ? 0 : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("MAP_VERSION_ID").Value.ToString()); rDR1["STG_REF_ID"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("STG_REF_ID").Value == null) ? 0 : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("STG_REF_ID").Value.ToString()); rDR1["KPI_REF_ID"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("KPI_REF_ID").Value == null) ? 0 : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("KPI_REF_ID").Value.ToString()); rDR1["SORT_ORDER"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("SORT_ORDER").Value == null) ? 0 : int.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("SORT_ORDER").Value.ToString()); colMKT = (TemplatedColumn)TugrdKPIPerStg.Rows[i].Band.Columns.FromKey("MAP_KPI_TYPE"); ddlMKT = (DropDownList)((CellItem)colMKT.CellItems[TugrdKPIPerStg.Rows[i].BandIndex]).FindControl("ddlMAP_KPI_TYPE"); rDR1["MAP_KPI_TYPE"] = PageUtility.GetByValueDropDownList(ddlMKT); rDR1["WEIGHT"] = (TugrdKPIPerStg.Rows[i].Cells.FromKey("WEIGHT").Value == null) ? 0 : double.Parse(TugrdKPIPerStg.Rows[i].Cells.FromKey("WEIGHT").Value.ToString()); rDR1["TXR_USER"] = intLogInUser; rDT1.Rows.Add(rDR1); } } if (rDT1.Rows.Count > 0) { MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi objKPI = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi(); objKPI.TxrAllBscMapKpi(rDT1); ltrScript.Text = JSHelper.GetAlertScript(objKPI.Transaction_Message, false); this.SetKpi(true); this.DrawMapTree(); } }
private void DrawMapTreeDetail(TreeView iTrvMap, int iEstTermRefID, int iEstDeptRefID1, int iMapVersionID, string iSelectedKey) { int cntRow = 0; int cntStg = 0; int cntKpi = 0; string strKey = ""; string strVal = ""; strKey = "D" + ";" + Convert.ToString(this.IEstDeptRefID1) + ";0"; strVal = this.IEstDeptName1 + " 전략맵"; TreeNode topNode = new TreeNode(strVal, strKey); iTrvMap.Nodes.Clear(); iTrvMap.Nodes.Add(topNode); topNode.ImageUrl = "../images/stg/TREE_D.gif"; TreeNode vNode; MicroBSC.BSC.Biz.Biz_Bsc_View_Info objView = new MicroBSC.BSC.Biz.Biz_Bsc_View_Info(); DataSet dsView = objView.GetAllList(); TreeNode sNode; MicroBSC.BSC.Biz.Biz_Bsc_Map_Stg objSTG = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Stg(); DataSet dsSTG = new DataSet(); TreeNode kNode; MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi objKPI = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi(); DataSet dsKPI = new DataSet(); cntRow = dsView.Tables[0].Rows.Count; for (int i = 0; i < cntRow; i++) { string imgWork = "<img alt='' src='../images/stg/TREE_W.gif'/>"; string imgExec = "<img alt='' src='../images/stg/TREE_E.gif'/>"; strKey = "V" + ";" + dsView.Tables[0].Rows[i]["VIEW_REF_ID"].ToString() + ";0"; strVal = dsView.Tables[0].Rows[i]["VIEW_NAME"].ToString(); vNode = new TreeNode(strVal, strKey); vNode.ImageUrl = "../images/stg/TREE_V.gif"; topNode.ChildNodes.Add(vNode); if (iSelectedKey == strKey) { vNode.Select(); vNode.ExpandAll(); vNode.SelectAction = TreeNodeSelectAction.Select; } int stgrefid = 0; int kpirefid = 0; dsSTG = objSTG.GetStrategyPerView(IEstTermRefID, IEstDeptRefID1, IMapVersionID, int.Parse(dsView.Tables[0].Rows[i]["VIEW_REF_ID"].ToString())); cntStg = dsSTG.Tables[0].Rows.Count; for (int j = 0; j < cntStg; j++) { strKey = "S" + ";" + dsSTG.Tables[0].Rows[j]["STG_REF_ID"].ToString() + ";0"; stgrefid = Convert.ToInt32(dsSTG.Tables[0].Rows[j]["STG_REF_ID"].ToString()); kpirefid = 0; strVal = dsSTG.Tables[0].Rows[j]["STG_NAME"].ToString() + (WorkCount(IEstTermRefID, IEstDeptRefID1, stgrefid, kpirefid) ? imgWork : "") + (ExecCount(IEstTermRefID, IEstDeptRefID1, stgrefid, kpirefid) ? imgExec : ""); sNode = new TreeNode(strVal, strKey); sNode.ImageUrl = "../images/stg/TREE_S.gif"; vNode.ChildNodes.Add(sNode); if (iSelectedKey == strKey) { sNode.Select(); sNode.ExpandAll(); sNode.SelectAction = TreeNodeSelectAction.Select; } dsKPI = objKPI.GetKpiListPerStg(IEstTermRefID, IEstDeptRefID1, IMapVersionID, int.Parse(dsSTG.Tables[0].Rows[j]["STG_REF_ID"].ToString())); cntKpi = dsKPI.Tables[0].Rows.Count; for (int k = 0; k < cntKpi; k++) { strKey = "K" + ";" + dsKPI.Tables[0].Rows[k]["KPI_REF_ID"].ToString() + ";" + dsSTG.Tables[0].Rows[j]["STG_REF_ID"].ToString(); kpirefid = Convert.ToInt32(dsKPI.Tables[0].Rows[k]["KPI_REF_ID"].ToString()); strVal = dsKPI.Tables[0].Rows[k]["KPI_NAME"].ToString() + (WorkCount(IEstTermRefID, IEstDeptRefID1, stgrefid, kpirefid) ? imgWork : "") + (ExecCount(IEstTermRefID, IEstDeptRefID1, stgrefid, kpirefid) ? imgExec : ""); kNode = new TreeNode(strVal, strKey); kNode.ImageUrl = "../images/stg/TREE_K.gif"; sNode.ChildNodes.Add(kNode); if (iSelectedKey == strKey) { kNode.Select(); kNode.ExpandAll(); kNode.SelectAction = TreeNodeSelectAction.Select; } } } } if (iTrvMap.SelectedNode == null) { topNode.Select(); } iTrvMap.ExpandAll(); }
/// <summary> /// 전략맵 트리구성 /// </summary> /// <param name="iTrvMap">트리</param> /// <param name="iEstTermRefID">평가기간</param> /// <param name="iEstDeptRefID">평가부서</param> public void DrawMapTree(TreeView iTrvMap, int iEstTermRefID, int iEstDeptRefID, int iMapVersionID, string iSelectedKey) { /* 수정작업 : 이천십일년 삼월 치릴 * 수정작자 : 장동건 * 수정내용 : BSC1004S1.ASPX 자화전자(성덕여왕 요청) * 측정주기 변경시 평가조직이 변경이 안됨 * 조건변수를 두개로 날림 * */ MicroBSC.Estimation.Dac.DeptInfos objDept = new MicroBSC.Estimation.Dac.DeptInfos(iEstDeptRefID); int cntRow = 0; int cntStg = 0; int cntKpi = 0; string strKey = ""; string strVal = ""; strKey = "D" + objDept.Dept_Ref_ID.ToString(); strVal = objDept.Dept_Name + " 전략맵"; TreeNode topNode = new TreeNode(strVal, strKey); iTrvMap.Nodes.Clear(); iTrvMap.Nodes.Add(topNode); topNode.ImageUrl = "../images/stg/TREE_D.gif"; TreeNode vNode; MicroBSC.BSC.Biz.Biz_Bsc_View_Info objView = new MicroBSC.BSC.Biz.Biz_Bsc_View_Info(); DataSet dsView = objView.GetAllList(); TreeNode sNode; MicroBSC.BSC.Biz.Biz_Bsc_Map_Stg objSTG = new Biz_Bsc_Map_Stg(); DataSet dsSTG = new DataSet(); TreeNode kNode; MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi objKPI = new Biz_Bsc_Map_Kpi(); DataSet dsKPI = new DataSet(); cntRow = dsView.Tables[0].Rows.Count; for (int i = 0; i < cntRow; i++) { strKey = "V" + dsView.Tables[0].Rows[i]["VIEW_REF_ID"].ToString(); strVal = dsView.Tables[0].Rows[i]["VIEW_NAME"].ToString(); vNode = new TreeNode(strVal, strKey); vNode.ImageUrl = "../images/stg/TREE_V.gif"; topNode.ChildNodes.Add(vNode); if (iSelectedKey == strKey) { vNode.Select(); vNode.ExpandAll(); vNode.SelectAction = TreeNodeSelectAction.Select; } dsSTG = objSTG.GetStrategyPerView(iEstTermRefID, iEstDeptRefID, iMapVersionID, int.Parse(dsView.Tables[0].Rows[i]["VIEW_REF_ID"].ToString())); cntStg = dsSTG.Tables[0].Rows.Count; for (int j = 0; j < cntStg; j++) { strKey = "S" + dsSTG.Tables[0].Rows[j]["STG_REF_ID"].ToString(); strVal = dsSTG.Tables[0].Rows[j]["STG_NAME"].ToString(); sNode = new TreeNode(strVal, strKey); sNode.ImageUrl = "../images/stg/TREE_S.gif"; vNode.ChildNodes.Add(sNode); if (iSelectedKey == strKey) { sNode.Select(); sNode.ExpandAll(); sNode.SelectAction = TreeNodeSelectAction.Select; } dsKPI = objKPI.GetKpiListPerStg(iEstTermRefID, iEstDeptRefID, iMapVersionID, int.Parse(dsSTG.Tables[0].Rows[j]["STG_REF_ID"].ToString())); cntKpi = dsKPI.Tables[0].Rows.Count; for (int k = 0; k < cntKpi; k++) { strKey = "K" + dsKPI.Tables[0].Rows[k]["KPI_REF_ID"].ToString(); strVal = dsKPI.Tables[0].Rows[k]["KPI_NAME"].ToString(); kNode = new TreeNode(strVal, strKey); kNode.ImageUrl = "../images/stg/TREE_K.gif"; sNode.ChildNodes.Add(kNode); if (iSelectedKey == strKey) { kNode.Select(); kNode.ExpandAll(); kNode.SelectAction = TreeNodeSelectAction.Select; } } } } if (iTrvMap.SelectedNode == null) { topNode.Select(); } iTrvMap.ExpandAll(); }