Esempio n. 1
0
        private void tv_hs_AfterSelect(object sender, TreeViewEventArgs e)
        {
            MyTreeNode node = (MyTreeNode)tv_hs.SelectedNode;

            if (node.Tag.ToString().Trim() == "0000")
            {
                return;
            }

            str_hsbh    = node.Tag.ToString().Trim();//函数编号
            txt_mc.Text = node.Text;
            txt_ms.Text = node.Str3.ToString().Trim();

            DataTable dt_tj_suggestion        = ywszbiz.Get_TJ_SUGGESTION();
            DataGridViewComboBoxColumn combox = new DataGridViewComboBoxColumn();

            combox.Name             = "zdbh";
            combox.HeaderText       = "对应诊断";
            combox.Width            = 180;
            combox.DataSource       = dt_tj_suggestion;
            combox.DisplayMember    = "keyword";
            combox.ValueMember      = "bh";
            combox.DataPropertyName = "zdbh";
            if (object.Equals(null, dgv_hsmx.Columns["zdbh"]))
            {
                dgv_hsmx.Columns.Insert(3, combox);
            }
            else
            {
                dgv_hsmx.Columns.Remove(dgv_hsmx.Columns["zdbh"]);
                dgv_hsmx.Columns.Insert(3, combox);
            }
            dt_tj_hsb_xmdz     = ywszbiz.Get_tj_hsb_xmdz(str_hsbh);
            dgv_dzb.DataSource = dt_tj_hsb_xmdz;

            dt_tj_hsb_dt        = ywszbiz.Get_tj_hsb_dt(str_hsbh);
            dgv_hsmx.DataSource = dt_tj_hsb_dt;

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