void DataBind() { tv_tjlxb.Nodes.Clear(); TreeNode node = new TreeNode("体检科室"); 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); }
void DataBind() { tv_tjlxb.Nodes.Clear(); str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码 TreeNode node = new TreeNode("体检科室"); node.Tag = "0"; DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb(); foreach (DataRow dr in dt_tjlxb.Rows) { string str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室) TreeNode node1 = new TreeNode(dr["mc"].ToString().Trim()); node1.Tag = str_lxbh; if (str_JykCode == str_lxbh) { DataTable dt_lclxb = ywszbiz.Get_tj_lclxb(); foreach (DataRow dr3 in dt_lclxb.Rows) { TreeNode node3 = new TreeNode(dr3["mc"].ToString().Trim()); node3.Tag = dr3["lclx"].ToString().Trim(); DataTable dt_tj_zhxm = ywszbiz.Get_tj_zhxm_hd(str_lxbh, node3.Tag.ToString()); foreach (DataRow dr4 in dt_tj_zhxm.Rows) { TreeNode node4 = new TreeNode(dr4["mc"].ToString().Trim()); node4.Tag = dr4["bh"].ToString().Trim(); //编号 if (dr4["yxbz"].ToString().Trim() == "0") //停用 { node4.ForeColor = Color.Red; } node3.Nodes.Add(node4); } node1.Nodes.Add(node3); } } else { DataTable dt_tj_zhxm = ywszbiz.Get_tj_zhxm_hd(str_lxbh); foreach (DataRow dr1 in dt_tj_zhxm.Rows) { TreeNode node2 = new TreeNode(dr1["mc"].ToString().Trim()); node2.Tag = dr1["bh"].ToString().Trim(); if (dr1["yxbz"].ToString().Trim() == "0")//停用 { node2.ForeColor = Color.Red; } node1.Nodes.Add(node2); } } node.Nodes.Add(node1); } tv_tjlxb.Nodes.Add(node); }
void DataBind_TJLX() { tv_tjlxb.Nodes.Clear(); str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码 TreeNode node = new TreeNode("体检科室"); node.Tag = "0"; DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb(); foreach (DataRow dr in dt_tjlxb.Rows) { string str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室) TreeNode node1 = new TreeNode(dr["mc"].ToString().Trim()); node1.Tag = str_lxbh; if (str_JykCode == str_lxbh) { DataTable dt_lclxb = ywszbiz.Get_tj_lclxb(); foreach (DataRow dr3 in dt_lclxb.Rows) { TreeNode node3 = new TreeNode(dr3["mc"].ToString().Trim()); node3.Tag = dr3["lclx"].ToString().Trim(); DataTable dt_tjxmb = ywszbiz.Get_tj_tjxmb(str_lxbh, node3.Tag.ToString()); foreach (DataRow dr4 in dt_tjxmb.Rows) { TreeNode node4 = new TreeNode(dr4["mc"].ToString().Trim()); node4.Tag = dr4["tjxm"].ToString().Trim(); node3.Nodes.Add(node4); } node1.Nodes.Add(node3); } } else { DataTable dt_tjxmb = ywszbiz.Get_tj_tjxmb(str_lxbh); foreach (DataRow dr1 in dt_tjxmb.Rows) { TreeNode node2 = new TreeNode(dr1["mc"].ToString().Trim()); node2.Tag = dr1["tjxm"].ToString().Trim(); node1.Nodes.Add(node2); } } node.Nodes.Add(node1); } tv_tjlxb.Nodes.Add(node); AddImage(node); cmb_xb.DataSource = xtbiz.GetXtZd(1);//性别 cmb_xb.DisplayMember = "xmmc"; cmb_xb.ValueMember = "bzdm"; }
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(); }
void DataBind_TJLX() { tv_tjlxb.Nodes.Clear(); str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码 MyTreeNode node = new MyTreeNode(); node.Text = "体检科室"; node.Tag = ""; //科室类型 node.Str = ""; //临床类型 DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb(); foreach (DataRow dr in dt_tjlxb.Rows) { string str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室) MyTreeNode node1 = new MyTreeNode(); node1.Text = dr["mc"].ToString().Trim(); node1.Tag = str_lxbh; //科室类型 node1.Str = ""; //临床类型,检验科之外的临床类型全部为空 if (str_JykCode == str_lxbh) { DataTable dt_lclxb = ywszbiz.Get_tj_lclxb(); foreach (DataRow dr2 in dt_lclxb.Rows) { MyTreeNode node2 = new MyTreeNode(); node2.Text = dr2["mc"].ToString().Trim(); node2.Tag = str_lxbh; //科室类型 node2.Str = dr2["lclx"].ToString().Trim(); //临床类型 node1.Nodes.Add(node2); } } node.Nodes.Add(node1); } tv_tjlxb.Nodes.Add(node); new Common.Common().AddImage(node); }
private void tv_jbmb_AfterSelect(object sender, TreeViewEventArgs e) { str_bh = tv_jbmb.SelectedNode.Tag.ToString().Trim(); if (str_bh == "000000") { return; } txt_mbmc.Enabled = true; DataTable dt_tj_jbmb_hd = ywszbiz.Get_tj_xmmb_hd(str_bh); if (dt_tj_jbmb_hd.Rows.Count < 0) { return; } this.Text = "项目模板设置【" + tv_jbmb.SelectedNode.Text.Trim() + "】"; txt_bh.Text = dt_tj_jbmb_hd.Rows[0]["bh"].ToString().Trim(); txt_disp_order.Text = dt_tj_jbmb_hd.Rows[0]["disp_order"].ToString().Trim(); txt_mbmc.Text = dt_tj_jbmb_hd.Rows[0]["mbmc"].ToString().Trim(); txt_bz.Text = dt_tj_jbmb_hd.Rows[0]["bz"].ToString().Trim(); DataBind_lv_jb(str_bh); tv_lx.Nodes.Clear(); MyTreeNode node = new MyTreeNode(); node.Tag = "0"; node.Text = "项目科室"; DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb(); foreach (DataRow dr in dt_tjlxb.Rows) { MyTreeNode node1 = new MyTreeNode(); node1.Tag = dr["lxbh"].ToString().Trim(); node1.Text = dr["mc"].ToString().Trim(); node.Nodes.Add(node1); } tv_lx.Nodes.Add(node); tv_lx.ExpandAll(); new Common.Common().AddImage(node); lv_jb2.Items.Clear(); DataTable dt_tj_sqdlx_dt = ywszbiz.Get_tj_xmmb_dt(str_bh); foreach (DataRow dr in dt_tj_sqdlx_dt.Rows) { MyListViewItem item = new MyListViewItem(); item.Text = dr["keyword"].ToString().Trim(); item.Tag = dr["bh"].ToString().Trim(); item.Str1 = dr["xh"].ToString().Trim(); item.Str2 = dr["jbbh"].ToString().Trim(); item.Str3 = dr["tjlx"].ToString().Trim(); lv_jb2.Items.Add(item); } lv_jb1.Items.Clear(); if (tv_jbmb.SelectedNode.Nodes.Count == 0) { tv_jbmb.SelectedNode.SelectedImageIndex = tv_jbmb.SelectedNode.ImageIndex; } }
void AddTree() { tv_tjlxb.Nodes.Clear(); TreeNode node = new TreeNode("体检科室"); node.Tag = "0"; DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb(); foreach (DataRow dr in dt_tjlxb.Rows) { string str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室) TreeNode node1 = new TreeNode(dr["mc"].ToString().Trim()); node1.Tag = str_lxbh; if (str_JykCode == str_lxbh) { DataTable dt_lclxb = ywszbiz.Get_tj_lclxb(); foreach (DataRow dr3 in dt_lclxb.Rows) { TreeNode node3 = new TreeNode(dr3["mc"].ToString().Trim()); node3.Tag = dr3["lclx"].ToString().Trim(); DataTable dt_tjxmb = ywszbiz.Get_tj_tjxmb(str_lxbh, node3.Tag.ToString()); foreach (DataRow dr4 in dt_tjxmb.Rows) { TreeNode node4 = new TreeNode(dr4["mc"].ToString().Trim()); node4.Tag = dr4["tjxm"].ToString().Trim(); //node4.StateImageIndex = 0; //node4.SelectedImageIndex = 0; //node4.ImageIndex = 0; //tv_tjlxb.ImageIndex = 0; if (dr4["qybz"].ToString().Trim() == "0") { //node4.StateImageIndex = 1; //node4.SelectedImageIndex = 1; //node4.ImageIndex = 1; //tv_tjlxb.ImageIndex = 1; node4.ForeColor = Color.Red; } node3.Nodes.Add(node4); } node1.Nodes.Add(node3); } } else { DataTable dt_tjxmb = ywszbiz.Get_tj_tjxmb(str_lxbh); foreach (DataRow dr1 in dt_tjxmb.Rows) { TreeNode node2 = new TreeNode(dr1["mc"].ToString().Trim()); node2.Tag = dr1["tjxm"].ToString().Trim(); if (dr1["qybz"].ToString().Trim() == "0") { node2.ForeColor = Color.Red; } node1.Nodes.Add(node2); } } node.Nodes.Add(node1); } tv_tjlxb.Nodes.Add(node); AddImage(node); }
void DataBind() { tv_tjlxb.Nodes.Clear(); str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码 TreeNode node = new TreeNode("体检科室"); node.Tag = "0"; DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb(); foreach (DataRow dr in dt_tjlxb.Rows) { string str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室) TreeNode node1 = new TreeNode(dr["mc"].ToString().Trim()); node1.Tag = str_lxbh; if (str_JykCode == str_lxbh) { DataTable dt_lclxb = ywszbiz.Get_tj_lclxb(); foreach (DataRow dr3 in dt_lclxb.Rows) { TreeNode node3 = new TreeNode(dr3["mc"].ToString().Trim()); node3.Tag = dr3["lclx"].ToString().Trim(); DataTable dt_tj_tjlxb = ywszbiz.Get_tj_zhxm_hd(str_lxbh, node3.Tag.ToString()); foreach (DataRow dr4 in dt_tj_tjlxb.Rows) { TreeNode node4 = new TreeNode(dr4["mc"].ToString().Trim()); node4.Tag = dr4["bh"].ToString().Trim(); //编号 if (dr4["yxbz"].ToString().Trim() == "0") //停用 { node4.ForeColor = Color.Red; } node3.Nodes.Add(node4); } node1.Nodes.Add(node3); } } else { DataTable dt_tjxmb = ywszbiz.Get_tj_zhxm_hd(str_lxbh); foreach (DataRow dr1 in dt_tjxmb.Rows) { TreeNode node2 = new TreeNode(dr1["mc"].ToString().Trim()); node2.Tag = dr1["bh"].ToString().Trim(); if (dr1["yxbz"].ToString().Trim() == "0")//停用 { node2.ForeColor = Color.Red; } node1.Nodes.Add(node2); } } node.Nodes.Add(node1); } tv_tjlxb.Nodes.Add(node); AddImage(node); cmb_ksmc.SelectedIndexChanged -= new EventHandler(cmb_ksmc_SelectedIndexChanged); cmb_ksmc.DataSource = ywszbiz.Get_tj_tjlxb(); cmb_ksmc.DisplayMember = "mc"; cmb_ksmc.ValueMember = "lxbh"; cmb_ksmc.SelectedIndexChanged += new EventHandler(cmb_ksmc_SelectedIndexChanged); cmb_bblx.DataSource = xtbiz.GetXtZd(6);//标本类型 cmb_bblx.DisplayMember = "xmmc"; cmb_bblx.ValueMember = "bzdm"; cmb_jyjclx.DataSource = xtbiz.GetXtZd(9);//检查类型 cmb_jyjclx.DisplayMember = "xmmc"; cmb_jyjclx.ValueMember = "bzdm"; cmb_sflb.DataSource = xtbiz.GetXtZd(7);//收费类型 cmb_sflb.DisplayMember = "xmmc"; cmb_sflb.ValueMember = "bzdm"; }