protected void btnAdd_Click(object sender, EventArgs e) { mainkid.Hidden = false; FineUIPro.TreeNode treenode = firsttree.SelectedNode; editID.Text = treenode.NodeID; if (treenode.NodeID == "systemmenu") { mainmpic.Hidden = false; dart.Hidden = true; } else { mainmpic.Hidden = true; dart.Hidden = false; string strdartmpci = string.Empty; pd_kidclass_mainmpic ul = new pd_kidclass_mainmpic(); DataTable dt = ul.getEditdata(treenode.NodeID); if (dt != null && dt.Rows.Count > 0) { foreach (System.Data.DataRow r in dt.Rows) { strdartmpci += r["mpci"] + ","; } strdartmpci = strdartmpci.Substring(0, strdartmpci.Length - 1); dartmpci.DataSource = commonLib.stringTolist(strdartmpci, ',');; dartmpci.DataBind(); } else { dartmpci.DataSource = ""; dartmpci.DataBind(); } } }
private void displaydetailinfo(string NodeID) { pd_kidclass_main um = new pd_kidclass_main(); System.Data.DataTable dt = um.getEditdata(NodeID); string strhtml = "空白详细信息"; firsttree.UncheckAllNodes(); if (dt != null && dt.Rows.Count > 0) { strhtml = "<div style=\"line-height:27px;\">"; foreach (System.Data.DataRow r in dt.Rows) { strhtml += "类别名:" + r["mainname"] + "<br/>序号:" + r["orderint"].ToString().Trim() + "<br/>编码:" + r["maincode"].ToString().Trim() + "<br/>创建时间:" + r["adddate"].ToString().Trim() + ""; pd_kidclass_mainmpic mainpic = new pd_kidclass_mainmpic(); DataTable picdt = mainpic.getEditdata(r["ID"].ToString()); if (picdt != null && picdt.Rows.Count > 0) { strhtml += "<br/>主类别特性指标:"; foreach (DataRow r1 in picdt.Rows) { strhtml += r1["mpci"] + ","; } } } strhtml += "</div>"; } else { pd_kidclass_secondary second = new pd_kidclass_secondary(); System.Data.DataTable dt1 = second.getEditdata(NodeID); if (dt1 != null && dt1.Rows.Count > 0) { strhtml = "<div style=\"line-height:27px;\">"; foreach (System.Data.DataRow r in dt1.Rows) { strhtml += "类别名:" + r["classname"] + "<br/>序号:" + r["orderint"].ToString().Trim() + "<br/>编码:" + r["darycode"].ToString().Trim() + "<br/>创建时间:" + r["adddate"].ToString().Trim() + ""; pd_kidclass_secondrec mainpic = new pd_kidclass_secondrec(); DataTable picdt = mainpic.getEditdata(r["ID"].ToString()); if (picdt != null && picdt.Rows.Count > 0) { strhtml += "<br/>特性指标:"; foreach (DataRow r1 in picdt.Rows) { strhtml += r1["mpci"] + ","; } } } strhtml += "</div>"; } } detailinfo.Text = strhtml; }