Esempio n. 1
0
        private void tv_sqdlx_AfterSelect(object sender, TreeViewEventArgs e)
        {
            str_flbh = tv_sqdlx.SelectedNode.Tag.ToString().Trim();
            if (str_flbh == "0000")
            {
                return;
            }
            txt_flmc.Enabled = true;
            DataTable dt_tj_sqdlx_hd = ywszbiz.Get_tj_sqdlx_hd(str_flbh);

            if (dt_tj_sqdlx_hd.Rows.Count < 0)
            {
                return;
            }

            this.Text                = "疾病模板设置【" + tv_sqdlx.SelectedNode.Text.Trim() + "】";
            txt_flbh.Text            = dt_tj_sqdlx_hd.Rows[0]["flbh"].ToString().Trim();
            txt_disp_order.Text      = dt_tj_sqdlx_hd.Rows[0]["disp_order"].ToString().Trim();
            txt_flmc.Text            = dt_tj_sqdlx_hd.Rows[0]["flmc"].ToString().Trim();
            cmb_jcjylx.SelectedValue = dt_tj_sqdlx_hd.Rows[0]["jcjylx"].ToString().Trim();
            cmb_bblx.SelectedValue   = dt_tj_sqdlx_hd.Rows[0]["bblx"].ToString().Trim();
            txt_bz.Text              = dt_tj_sqdlx_hd.Rows[0]["bz"].ToString().Trim();

            str_jcjylx = dt_tj_sqdlx_hd.Rows[0]["jcjylx"].ToString().Trim();
            DataBind_lv_xm(str_flbh);

            tv_lx.Nodes.Clear();
            MyTreeNode node = new MyTreeNode();

            node.Tag  = "0";
            node.Text = "体检科室";
            node.Str  = "";
            DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb_jcjylx(str_jcjylx);

            foreach (DataRow dr in dt_tjlxb.Rows)
            {
                MyTreeNode node1 = new MyTreeNode();
                node1.Tag  = dr["lxbh"].ToString().Trim();
                node1.Text = dr["mc"].ToString().Trim();
                node1.Str  = "";
                if (str_jcjylx == "0")
                {
                    DataTable dt_tj_lclxb = ywszbiz.Get_tj_lclxb();
                    foreach (DataRow dr1 in dt_tj_lclxb.Rows)
                    {
                        MyTreeNode node2 = new MyTreeNode();
                        node2.Tag  = node1.Tag;
                        node2.Text = dr1["mc"].ToString().Trim();
                        node2.Str  = dr1["lclx"].ToString().Trim();
                        node1.Nodes.Add(node2);
                    }
                }
                node.Nodes.Add(node1);
            }
            tv_lx.Nodes.Add(node);
            tv_lx.ExpandAll();

            lv_xm2.Items.Clear();
            DataTable dt_tj_sqdlx_dt = ywszbiz.Get_tj_sqdlx_dt(str_flbh);

            foreach (DataRow dr in dt_tj_sqdlx_dt.Rows)
            {
                MyListViewItem item = new MyListViewItem();
                item.Tag  = dr["bh"].ToString().Trim();
                item.Text = dr["mc"].ToString().Trim();
                item.Str1 = dr["flbh"].ToString().Trim();
                item.Str2 = dr["xh"].ToString().Trim();
                item.Str3 = dr["tjlx"].ToString().Trim();
                lv_xm2.Items.Add(item);
            }

            lv_xm1.Items.Clear();
        }