Ejemplo n.º 1
0
        private void Form_ysksqx_Load(object sender, EventArgs e)
        {
            dgv_czy.AutoGenerateColumns = false;
            xtggBiz xtggbiz = new xtggBiz();

            dgv_czy.DataSource = xtggbiz.Get_xt_czy();
            ywszBiz ywszbiz = new ywszBiz();
            //增加科室树
            DataTable kstable = ywszbiz.Get_tj_tjlxb();

            if (kstable != null)
            {
                advTree1.ImageList = imageList1;
                advTree1.CheckBoxImageUnChecked = imageList1.Images[1];
                advTree1.CheckBoxImageChecked   = imageList1.Images[2];
                advTree1.Nodes.Clear();
                DevComponents.AdvTree.Node nodeFather;
                nodeFather                 = new DevComponents.AdvTree.Node();
                nodeFather.Text            = "科室已分权限";
                nodeFather.Tag             = "";
                nodeFather.Name            = "";
                nodeFather.ImageIndex      = 0;
                nodeFather.CheckBoxVisible = true;
                advTree1.Nodes.Add(nodeFather);
                //
                for (int i = 0; i < kstable.Rows.Count; i++)
                {
                    DevComponents.AdvTree.Node nod = new DevComponents.AdvTree.Node();
                    nod.CheckBoxVisible = true;
                    nod.Text            = kstable.Rows[i]["mc"].ToString();
                    nod.Tag             = kstable.Rows[i]["lxbh"].ToString();
                    //nod.Name = plist[i].ToString();//利用name tag 是否相同 来判断是否父节点
                    nodeFather.Nodes.Add(nod);
                }
                advTree1.ExpandAll();
            }
        }
Ejemplo n.º 2
0
        private void tj_mrfz(string str_dwbh)// by zhz
        {
            //read
            if (str_dwbh == "")
            {
                return;                //没有选择节点
            }
            ywszBiz   ywszbiz = new ywszBiz();
            DataTable dt_tjtc = ywszbiz.Get_tj_tc_hd();

            for (int i = 0; i < dt_tjtc.Rows.Count; i++)
            {
                DataRow   dr_tc       = dt_tjtc.Rows[i];              //体检项目
                string    str_bh      = dr_tc["bh"].ToString().Trim();
                DataTable dt_tj_tc_dc = ywszbiz.Get_tj_tc_dt(str_bh); //体检内容

                //add
                txt_fzbh.Text = dr_tc["bh"].ToString().Trim();
                txt_fzmc.Text = dr_tc["mc"].ToString().Trim();
                //cmb_xb.SelectedValue = dr_tc["xb"].ToString().Trim();
                txt_zc.Text = "";
                txt_zw.Text = "";

                str_fzbh = tjglbiz.Get_proc_get_tjdwfzbh(str_dwbh);
                tjdjBiz tjblbiz1 = new tjdjBiz();
                tjblbiz1.str_Delete_TJ_DWFZ_HD(str_fzbh, str_dwbh);
                tjblbiz1.str_Insert_TJ_DWFZ_HD(str_fzbh, str_dwbh, txt_fzmc.Text.Trim(), "1", txt_zw.Text.Trim(), txt_zc.Text.Trim());//1 是男士
                foreach (DataRow dr_dc in dt_tj_tc_dc.Rows)
                {
                    string aa = dr_dc["zhxm"].ToString().Trim();
                    string bb = dr_dc["mc"].ToString().Trim();
                    tjblbiz1.str_Insert_TJ_DWFZ_DT(str_fzbh, str_dwbh, aa);
                }
                tjblbiz1.Exec_ArryList();
            }
        }