示例#1
0
        private void bt_save_Click(object sender, EventArgs e)
        {
            //tj_mrfz_all();
            //return;
            if (str_dwbh == "")
            {
                return;                //没有选择节点
            }
            if (txt_fzmc.Text.Trim() == "")
            {
                MessageBox.Show("请填写分组名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = txt_fzmc;
                return;
            }

            //if (lv_tjxm.Items.Count <= 0)
            //{
            //    MessageBox.Show("请选择体检项目或套餐后再保存!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    return;
            //}

            if (str_fzbh == "")//获取分组编号
            {
                str_fzbh      = tjglbiz.Get_proc_get_tjdwfzbh(str_dwbh);
                txt_fzbh.Text = str_fzbh;
            }
            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(), cmb_xb.SelectedValue.ToString().Trim(), txt_zw.Text.Trim(), txt_zc.Text.Trim());
            foreach (ListViewItem item in lv_tjxm.Items)
            {
                string aa = item.Tag.ToString().Trim();
                string bb = item.Text.ToString().Trim();
                tjblbiz1.str_Insert_TJ_DWFZ_DT(str_fzbh, str_dwbh, aa);
            }
            tjblbiz1.Exec_ArryList();
            MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            DataBind();
            tv_tjdw.ExpandAll();
        }
示例#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();
            }
        }