private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { try { this.Cursor = Cursors.WaitCursor; if (this.treeView1.SelectedNode is DeptNode) { DeptNode oNode = (DeptNode)this.treeView1.SelectedNode; cmbBIZCD.EditValue = oNode.BIZCD; txtDEPTCODE.EditValue = oNode.DEPTCODE; txtDEPTNAME.EditValue = oNode.DEPTNAME; txtDEPTABBR.EditValue = oNode.DEPTABBR; txtSTARTYM.EditValue = oNode.STARTYM; txtENDYM.EditValue = oNode.ENDYM; chkUSEYN.EditValue = oNode.USEYN; txtRNKORDER.EditValue = oNode.RNKORDER; txtLEVEL.EditValue = oNode.LEVEL; txtREFCODE.EditValue = oNode.REFCODE; txtMEMO.EditValue = oNode.MEMO; } } catch (Exception ex) { MessageAgent.MessageShow(MessageType.Error, ex.ToString()); } finally { this.Cursor = Cursors.Default; } }
void CreateNode2(BizNode OrNode) { if (OrNode == null) { return; } try { _dsDeptInfo2 = ServiceAgent.ExecuteDataSet(false, "CONIS_IBS", "USP_MM_MM02_SELECT_02", txtCOMPANYCD.EditValue, "2"); DataRow[] drs2 = _dsDeptInfo2.Tables[0].Select("LEVEL=0 AND BIZCD = '" + OrNode.BIZCD + "'", " RNKORDER ASC"); for (int i = 0; i < drs2.Length; i++) { DeptNode OrNode2 = new DeptNode(drs2[i]); OrNode.Nodes.Add(OrNode2); CreateNode3(OrNode2, _dsDeptInfo2); } } catch (Exception ex) { MessageAgent.MessageShow(MessageType.Error, ex.ToString()); } }
void CreateNode3(DeptNode OrNode3, DataSet DeptDs) { if (OrNode3 == null || DeptDs == null) { return; } try { DataRow[] drs3 = DeptDs.Tables[0].Select("LEVEL=1 AND BIZCD = '" + OrNode3.BIZCD + "' AND REFCODE='" + OrNode3.DEPTCODE + "'", " RNKORDER ASC"); for (int i = 0; i < drs3.Length; i++) { DeptNode OrNode4 = new DeptNode(drs3[i]); OrNode3.Nodes.Add(OrNode4); } } catch (Exception ex) { MessageAgent.MessageShow(MessageType.Error, ex.ToString()); } }