Ejemplo n.º 1
0
        private void bt_save_Click(object sender, EventArgs e)
        {
            if (txt_mbmc.Text.Trim() == "")
            {
                MessageBox.Show("请填写模板名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = txt_mbmc;
                return;
            }
            if (txt_bh.Text.Trim() == "")
            {
                txt_bh.Text = xtbiz.GetHmz("jbmbid", 1);
            }
            if (txt_disp_order.Text.Trim() == "")
            {
                txt_disp_order.Text = txt_bh.Text;
            }
            str_bh = txt_bh.Text.Trim();

            ywszBiz ywszbiz1 = new ywszBiz();

            ywszbiz1.str_Insert_tj_xmmb_hd(txt_bh.Text.Trim(), txt_disp_order.Text.Trim(), txt_mbmc.Text.Trim(), txt_bz.Text.Trim());
            ywszbiz1.Exec_ArryList();
            MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            DataBind();
        }
Ejemplo n.º 2
0
        private void bt_save1_Click(object sender, EventArgs e)
        {
            if (str_tjlx == "" || str_tjxm == "")
            {
                return;
            }

            ywszBiz ywszbiz1 = new ywszBiz();

            ywszbiz1.str_Sqltxt("delete tj_keyword where tjxm='" + str_tjxm + "'");
            dt_tj_keyword1.AcceptChanges();
            foreach (DataRow dr in dt_tj_keyword1.Rows)
            {
                if (dr["bh"].ToString().Trim() == "" || dr["mc"].ToString().Trim() == "")
                {
                    MessageBox.Show("请填写顺序号、描述!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                ywszbiz1.str_Insert_tj_keyword_zf(dr["bh"].ToString().Trim(), dr["mc"].ToString().Trim(), dr["keyword"].ToString().Trim(),
                                                  dr["into_xj"].ToString().Trim(), dr["mcjrxj"].ToString().Trim(), dr["sfyx"].ToString().Trim(), dr["pyjm"].ToString().Trim(),
                                                  dr["wbjm"].ToString().Trim(), dr["jglx"].ToString().Trim(), cmb_xb.SelectedValue.ToString().Trim(), str_tjlx,//dr["tjlx"].ToString().Trim(),
                                                  dr["tjxm"].ToString().Trim());
            }

            string str_jgjrxj = "1"; //结果进入小结
            string str_mcjrxj = "1"; //名称进入小结

            if (rb_jgsfjrxj1.Checked)
            {
                str_jgjrxj = "1";
            }
            else
            {
                str_jgjrxj = "0";
            }
            if (rb_xmmcsfjrxj1.Checked)
            {
                str_mcjrxj = "1";
            }
            else
            {
                str_mcjrxj = "0";
            }
            ywszbiz1.str_Update_tj_tjxmb(str_tjlx, str_tjxm, str_jgjrxj, str_mcjrxj);

            ywszbiz1.Exec_ArryList();
            MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Ejemplo n.º 3
0
        private void bt_save_Click(object sender, EventArgs e)
        {
            if (txt_flmc.Text.Trim() == "")
            {
                MessageBox.Show("请填写分类名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = txt_flmc;
                return;
            }
            if (object.Equals(null, cmb_jcjylx.SelectedValue))
            {
                MessageBox.Show("请选择检查类型!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = cmb_jcjylx;
                return;
            }
            if (cmb_jcjylx.SelectedValue.ToString().Trim() == "0" && object.Equals(null, cmb_bblx.SelectedValue))
            {
                MessageBox.Show("请选择标本类型!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = cmb_bblx;
                return;
            }
            string str_bblx = "";

            try
            {
                str_bblx = cmb_bblx.SelectedValue.ToString().Trim();
            }
            catch
            {
            }
            if (txt_flbh.Text.Trim() == "")
            {
                txt_flbh.Text = xtbiz.GetHmz("sqdflbh", 1);
            }
            if (txt_disp_order.Text.Trim() == "")
            {
                txt_disp_order.Text = txt_flbh.Text;
            }
            str_flbh   = txt_flbh.Text.Trim();
            str_jcjylx = cmb_jcjylx.SelectedValue.ToString().Trim();
            ywszBiz ywszbiz1 = new ywszBiz();

            ywszbiz1.str_Insert_tj_sqdlx_hd(txt_flbh.Text.Trim(), txt_disp_order.Text.Trim(), txt_flmc.Text.Trim(), str_jcjylx, str_bblx, txt_bz.Text.Trim());
            ywszbiz1.Exec_ArryList();
            MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            DataBind();
        }
Ejemplo n.º 4
0
        private void bt_save_Click(object sender, EventArgs e)
        {
            if (object.Equals(null, cmb_xb.SelectedValue))
            {
                MessageBox.Show("请选择性别!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = cmb_xb;
                return;
            }
            if (txt_mc.Text.Trim() == "")
            {
                MessageBox.Show("请填写套餐名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = txt_mc;
                return;
            }
            if (object.Equals(null, cmb_tjywlx.SelectedValue))
            {
                MessageBox.Show("请选择业务类型!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = cmb_tjywlx;
                return;
            }

            if (lv_tjtcxm.Items.Count <= 0)
            {
                MessageBox.Show("体检套餐项目不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                //this.ActiveControl = cmb_tjywlx;
                return;
            }

            if (txt_bh.Text.Trim() == "")
            {
                str_bh      = xtbiz.GetHmz("tcid", 1);
                txt_bh.Text = str_bh;
            }
            ywszBiz ywszbiz1 = new ywszBiz();

            ywszbiz1.str_Insert_tj_tc_hd(txt_bh.Text.Trim(), txt_disp_order.Text.Trim(), cmb_xb.SelectedValue.ToString().Trim(), txt_mc.Text.Trim(),
                                         txt_jc.Text.Trim(), txt_bzjg.Text.Trim(), txt_jg.Text.Trim(), cmb_tjywlx.SelectedValue.ToString().Trim(), txt_bz.Text.Trim());
            ywszbiz1.str_Delete_tj_tc_dc(str_bh);
            foreach (ListViewItem item in lv_tjtcxm.Items)
            {
                ywszbiz1.str_Insert_tj_tc_dc(str_bh, item.Tag.ToString().Trim());
            }
            ywszbiz1.Exec_ArryList();
            MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            DataBind();
        }
Ejemplo n.º 5
0
 private void bt_delete_Click(object sender, EventArgs e)
 {
     if (str_bh == "")
     {
         return;
     }
     if (DialogResult.Yes == MessageBox.Show("是否真的删除?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1))
     {
         ywszBiz ywszbiz1 = new ywszBiz();
         ywszbiz1.str_Delete_tj_tc_hd(str_bh);
         ywszbiz1.str_Delete_tj_tc_dc(str_bh);
         ywszbiz1.Exec_ArryList();
         MessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         tv_tc.Nodes.Remove(tv_tc.SelectedNode);
         ClearControl();
     }
 }
Ejemplo n.º 6
0
        private void bt_savemx_Click(object sender, EventArgs e)
        {
            if (txt_bh.Text.Trim() == "")
            {
                return;
            }

            ywszBiz ywszbiz1 = new ywszBiz();

            ywszbiz1.str_Sqltxt("delete tj_zhxm_dt where bh='" + txt_bh.Text.Trim() + "'");
            foreach (DataGridViewRow dgr in dgv_tjxmb.Rows)
            {
                if (Convert.ToBoolean(dgr.Cells["xz"].Value))
                {
                    ywszbiz1.str_Insert_tj_zhxm_dt(txt_bh.Text.Trim(), cmb_ksmc.SelectedValue.ToString().Trim(), dgr.Cells["tjxm"].Value.ToString().Trim(), "1");
                }
            }
            ywszbiz1.Exec_ArryList();
            MessageBox.Show("保存明细成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Ejemplo n.º 7
0
        void DataBind(string str_tjlx)
        {
            ywszBiz ywszbiz = new ywszBiz();

            if (str_tjlx == "" && str_lclx == "")
            {
                dt = ywszbiz.Get_TJ_SUGGESTION2();
            }
            else if (str_tjlx != "" && str_lclx == "")
            {
                dt = ywszbiz.Get_TJ_SUGGESTION3(str_tjlx);
            }
            else
            {
                dt = ywszbiz.Get_TJ_SUGGESTION1(str_tjlx, str_lclx);
            }
            if (dt.Rows.Count < 1)
            {
                this.ActiveControl = txt_pym;
                return;
            }
            this.dgv_zd.DataSource = dt;
            this.ActiveControl     = dgv_zd;
        }
Ejemplo n.º 8
0
        private void bt_save3_Click(object sender, EventArgs e)
        {
            if (str_tjlx == "" || str_tjxm == "")
            {
                return;
            }

            dt_tj_keyword3.AcceptChanges();
            //if (dt_tj_keyword3.Rows.Count < 1) return;
            ywszBiz ywszbiz1 = new ywszBiz();

            ywszbiz1.str_Sqltxt("delete tj_keyword where tjlx='" + str_tjlx + "' and tjxm='" + str_tjxm + "' and jglx!='10'");
            foreach (DataRow dr in dt_tj_keyword3.Rows)
            {
                if (Check_GridDataView_Zcfw(dgv_xmjg3))
                {
                    MessageBox.Show("请选择一个【是否正常范围】区间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                //if (dr["bh"].ToString().Trim() == "" || dr["mc"].ToString().Trim() == "")
                //{
                //    MessageBox.Show("请填写顺序号、描述!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                //    return;
                //}
                if (Convert.ToDecimal(dr["dy"].ToString().Trim()) > Convert.ToDecimal(dr["xy"].ToString().Trim()) && Convert.ToDecimal(dr["xy"].ToString().Trim()) > 0)
                {
                    MessageBox.Show("下限值不能大于上限值,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                ywszbiz1.str_Insert_tj_keyword_sz(dr["bh"].ToString().Trim(), dr["nlxx"].ToString().Trim(), dr["nlsx"].ToString().Trim(), dr["dy"].ToString().Trim(),
                                                  dr["xy"].ToString().Trim(), dr["mc"].ToString().Trim(), dr["sfzc"].ToString().Trim(), dr["keyword"].ToString().Trim(), dr["mcjrxj"].ToString().Trim(),
                                                  dr["into_xj"].ToString().Trim(), dr["sfyx"].ToString().Trim(), dr["pyjm"].ToString().Trim(), dr["wbjm"].ToString().Trim(), dr["jglx"].ToString().Trim(),
                                                  "1", dr["tjlx"].ToString().Trim(), dr["tjxm"].ToString().Trim(), dr["spy"].ToString().Trim(), dr["xpy"].ToString().Trim(), dr["whys"].ToString().Trim());//性别1为女性
            }

            string str_jgjrxj = "1"; //结果进入小结
            string str_mcjrxj = "1"; //名称进入小结

            if (rb_jgsfjrxj1.Checked)
            {
                str_jgjrxj = "1";
            }
            else
            {
                str_jgjrxj = "0";
            }
            if (rb_xmmcsfjrxj1.Checked)
            {
                str_mcjrxj = "1";
            }
            else
            {
                str_mcjrxj = "0";
            }
            ywszbiz1.str_Update_tj_tjxmb(str_tjlx, str_tjxm, str_jgjrxj, str_mcjrxj);

            ywszbiz1.Exec_ArryList();
            MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            dt_tj_keyword2       = ywszbiz.Get_tj_keyword_sz_all(str_tjxm); //数值类型男女共用
            dt_tj_keyword3       = ywszbiz.Get_tj_keyword_sz_nx(str_tjxm);  //数值男性
            dt_tj_keyword4       = ywszbiz.Get_tj_keyword_sz_vx(str_tjxm);  //数值女性
            dgv_xmjg2.DataSource = dt_tj_keyword2;
            dgv_xmjg3.DataSource = dt_tj_keyword3;
            dgv_xmjg4.DataSource = dt_tj_keyword4;
        }