Пример #1
0
        private void DataBind()
        {
            str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码
            //检验小组获取
            cmb_jydyxz.DataSource    = lisbiz.Get_PGroup();
            cmb_jydyxz.DisplayMember = "CName";
            cmb_jydyxz.ValueMember   = "SectionNo";
            cmb_jydyxz.SelectedValue = -1;

            //获取组合项目
            DataTable dt_tj_lclxb = lisbiz.Get_TJ_LCLXB();

            foreach (DataRow dr in dt_tj_lclxb.Rows)
            {
                TreeNode node1    = new TreeNode(dr["mc"].ToString());
                string   str_lclx = dr["lclx"].ToString();

                DataTable dt_tj_tjxmb = lisbiz.Get_TJ_ZHXM_HD(str_JykCode, str_lclx);
                foreach (DataRow drs in dt_tj_tjxmb.Rows)
                {
                    TreeNode node2 = new TreeNode();
                    node2.Text = drs["mc"].ToString().Trim();
                    node2.Tag  = drs["bh"].ToString().Trim();
                    node1.Nodes.Add(node2);
                }

                tv_jyzhxm.Nodes.Add(node1);
            }
        }
Пример #2
0
        private void DataBind()
        {
            str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码

            DataTable dt_tj_lclxb = lisbiz.Get_TJ_LCLXB();

            foreach (DataRow dr in dt_tj_lclxb.Rows)
            {
                TreeNode node1    = new TreeNode(dr["mc"].ToString());
                string   str_lclx = dr["lclx"].ToString();

                DataTable dt_tj_tjxmb = lisbiz.Get_TJ_TJXMB(str_JykCode, str_lclx);
                foreach (DataRow drs in dt_tj_tjxmb.Rows)
                {
                    TreeNode node2 = new TreeNode();
                    node2.Text = drs["mc"].ToString();
                    node2.Tag  = drs["tjxm"].ToString();
                    node1.Nodes.Add(node2);
                }

                tv_jyxm.Nodes.Add(node1);
            }
        }