Example #1
0
        private void tv_lx_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (str_bh == "")
            {
                return;
            }
            if (tv_lx.SelectedNode.Tag.ToString().Trim() == "0")
            {
                return;
            }

            MyTreeNode node     = (MyTreeNode)tv_lx.SelectedNode;
            string     str_lxbh = node.Tag.ToString().Trim();//¿ÆÊÒID

            lv_jb1.Items.Clear();
            DataTable dt_tj_zhxm_hd = ywszbiz.Get_tj_suggestion(str_lxbh, str_bh);

            foreach (DataRow dr in dt_tj_zhxm_hd.Rows)
            {
                MyListViewItem item = new MyListViewItem();
                item.Text = dr["keyword"].ToString().Trim();
                item.Tag  = dr["jbbh"].ToString().Trim();
                item.Str1 = dr["tjlx"].ToString().Trim();
                lv_jb1.Items.Add(item);
            }

            if (tv_lx.SelectedNode.Nodes.Count == 0)
            {
                tv_lx.SelectedNode.SelectedImageIndex = tv_lx.SelectedNode.ImageIndex;
            }
        }