Exemplo n.º 1
0
        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;
        }