コード例 #1
0
        protected void addsecondrec_Click(object sender, EventArgs e)
        {
            addsecondrecWin.Title  = "添加分类别特性指标";
            addsecondrecWin.Hidden = false;
            string str1 = secondrecWineditID.Text;
            pd_kidclass_secondary ul1 = new pd_kidclass_secondary();
            DataTable             dt1 = ul1.getEditdata(str1);
            DataRow r1     = dt1.Rows[0];
            string  mainID = r1["mainID"].ToString();

            textSavesecondrec.Text = mainID;
            DataTable dt          = ul1.getEditdata(mainID, str1);
            string    strdartmpci = string.Empty;

            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);
                secondrecmpci.DataSource = commonLib.stringTolist(strdartmpci, ',');;
                secondrecmpci.DataBind();
            }
            else
            {
                secondrecmpci.DataSource = "";
                secondrecmpci.DataBind();
            }
        }
コード例 #2
0
        private void initinfo(string strID)
        {
            pd_kidclass_main ul = new pd_kidclass_main();

            System.Data.DataTable dt = ul.getEditdata(strID);
            if (dt != null && dt.Rows.Count > 0)
            {
                DataRow r = dt.Rows[0];

                editID.Text       = strID;
                editmainname.Text = r["mainname"].ToString().Trim();
                editorder.Text    = r["orderint"].ToString().Trim();
                editcode.Text     = r["maincode"].ToString().Trim();
            }
            else
            {
                pd_kidclass_secondary ul1 = new pd_kidclass_secondary();
                DataTable             dt1 = ul1.getEditdata(strID);
                DataRow r = dt1.Rows[0];

                editID.Text       = strID;
                editmainname.Text = r["classname"].ToString().Trim();
                editorder.Text    = r["orderint"].ToString().Trim();
                editcode.Text     = r["darycode"].ToString().Trim();
            }
        }
コード例 #3
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;
        }