Esempio n. 1
0
        void DataBind()
        {
            tv_lclxb.Nodes.Clear();
            TreeNode  node = new TreeNode("临床类型");
            DataTable dt   = ywszbiz.Get_tj_lclxb();

            foreach (DataRow dr in dt.Rows)
            {
                TreeNode node1 = new TreeNode(dr["mc"].ToString());
                node1.Tag = dr["lclx"].ToString();
                node.Nodes.Add(node1);
            }
            tv_lclxb.Nodes.Add(node);
            tv_lclxb.ExpandAll();
            new Common.Common().AddImage(node);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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";
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
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();
        }
Esempio n. 7
0
        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";
        }