예제 #1
0
        void DataBind()
        {
            tv_tc.Nodes.Clear();

            TreeNode  node    = new TreeNode("体检套餐");
            DataTable dt_tjtc = ywszbiz.Get_tj_tc_hd();

            foreach (DataRow dr in dt_tjtc.Rows)
            {
                string   str_bh = dr["bh"].ToString().Trim();//类型编号(科室)
                TreeNode node1  = new TreeNode(dr["mc"].ToString().Trim());
                node1.Tag = str_bh;

                node.Nodes.Add(node1);
            }
            tv_tc.Nodes.Add(node);
            tv_tc.ExpandAll();
            new Common.Common().AddImage(node);

            cmb_xb.DataSource    = xtbiz.GetXtZd(1);//性别
            cmb_xb.DisplayMember = "xmmc";
            cmb_xb.ValueMember   = "bzdm";

            cmb_tjywlx.DataSource    = xtbiz.GetXtZd(10);//业务类型
            cmb_tjywlx.DisplayMember = "xmmc";
            cmb_tjywlx.ValueMember   = "bzdm";
        }
예제 #2
0
        private void Form_zhxmlr_Load(object sender, EventArgs e)
        {
            new Common.Common().AddImages(imageList1);
            tv_tjlxb.ImageList = imageList1;

            lv_tc.SmallImageList = imageList1;
            lv_tc.StateImageList = imageList1;
            lv_tc.LargeImageList = imageList1;

            lv_uncheckxm.SmallImageList = imageList1;
            lv_uncheckxm.StateImageList = imageList1;
            lv_uncheckxm.LargeImageList = imageList1;

            lv_checkxm.Items.Clear();
            lv_checkxm.View = View.SmallIcon;
            foreach (DataRow dr in dt_tj_tc_dt.Rows)
            {
                ListViewItem item = new ListViewItem();
                item.Tag  = dr["zhxm"].ToString().Trim();
                item.Text = dr["mc"].ToString().Trim();
                lv_checkxm.Items.Add(item);
            }

            lv_tc.Items.Clear();
            lv_tc.View = View.Tile;
            DataTable dt_tj_tc_hd = ywszbiz.Get_tj_tc_hd();

            foreach (DataRow dr in dt_tj_tc_hd.Rows)
            {
                ListViewItem item = new ListViewItem();
                item.Tag        = dr["bh"].ToString().Trim();
                item.Text       = dr["mc"].ToString().Trim();
                item.ImageIndex = 5;
                lv_tc.Items.Add(item);
            }

            tv_tjlxb.Nodes.Clear();
            TreeNode node = new TreeNode("体检科室");

            node.Tag = "00";
            DataTable dt = ywszbiz.Get_tj_tjlxb();

            foreach (DataRow dr in dt.Rows)
            {
                TreeNode node1 = new TreeNode(dr["mc"].ToString());
                node1.Tag = dr["lxbh"].ToString();
                node.Nodes.Add(node1);
            }
            tv_tjlxb.Nodes.Add(node);
            tv_tjlxb.ExpandAll();
            new Common.Common().AddImage(node);

            dt_tj_zhxm_hd = ywszbiz.Get_tj_zhxm_hd();
        }