Example #1
0
        private void bt_save_Click(object sender, EventArgs e)
        {
            if (str_tjbh == "" || str_tjcs == "")
            {
                return;
            }

            tjjgBiz tjjgbiz1 = new tjjgBiz();

            tjjgbiz1.str_Delete_tj_zyjlmx(str_tjbh, str_tjcs);
            foreach (Control TabPage in tabControl.TabPages)
            {
                string tzlx = TabPage.Name;//体质类型
                foreach (Control panel in TabPage.Controls)
                {
                    //MessageBox.Show(panel.GetType().ToString());
                    if (panel.GetType().ToString() == "System.Windows.Forms.Panel")
                    {
                        string xh  = panel.Name;
                        string xxz = "0";
                        foreach (Control radiobutton in panel.Controls)
                        {
                            //MessageBox.Show(radiobutton.GetType().ToString());
                            if (radiobutton.GetType().ToString() == "System.Windows.Forms.RadioButton")
                            {
                                RadioButton rb = (RadioButton)radiobutton;
                                if (rb.Checked)
                                {
                                    xxz = rb.Tag.ToString();
                                    break;
                                }
                            }
                        }
                        tjjgbiz1.str_Insert_tj_zyjlmx(str_tjbh, str_tjcs, tzlx, xh, xxz);
                    }
                }
            }
            tjjgbiz1.str_Exec_proc_tj_zyjl(str_tjbh, str_tjcs);
            tjjgbiz1.Exec_ArryList();
            str_sumover = "2";
            //MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

            TJ_ZYJL_DataBind(str_tjbh, str_tjcs);
            Form_zywj_tzjy frm = new Form_zywj_tzjy(str_tjbh, str_tjcs, str_tzjl);

            frm.ShowDialog();
        }
Example #2
0
        private void bt_save_Click(object sender, EventArgs e)
        {
            #region 医生录入判断
            if (str_tjbh == "")
            {
                return;
            }
            if (object.Equals(null, cmb_zjys.SelectedValue))
            {
                MessageBox.Show("请选择主检医生!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = cmb_zjys;
                return;
            }
            #endregion

            #region 办证条件是否必须录入
            string str_bztjlr = xtbiz.GetXtCsz("bztjlr");//1必须,0-不录入
            if (cmb_jktj.Text.Trim() == "" && str_bztjlr == "1")
            {
                MessageBox.Show("请选择办证条件!", "提示--只有合格才能办证", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = cmb_jktj;
                return;
            }
            #endregion

            #region 体检职业结论,健康异常和职业健康异常是否必须录入
            string str_jkyclr = xtbiz.GetXtCsz("jkycsflr");//1必须,其它不录入
            if (str_jkyclr == "1")
            {
                if (cmb_zytjjl.Text.Trim() == "" || cmb_zyjy.Text.Trim() == "")
                {
                    MessageBox.Show("请体检职业结论!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                if (rbt_jkyc.Checked == false && rbt_zyjkyc.Checked == false && rbt_null.Checked == false)
                {
                    MessageBox.Show("请判断健康异常!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
            #endregion

            #region 职业体检结论互斥及相关性逻辑判断

            #endregion

            string str_zjys   = "";                              //总检医生
            string str_tjjl   = "";                              //体检结论
            string str_jktj   = "";                              //健康证条件
            string str_jkycbz = "";                              //健康异常标志
            str_zjys = cmb_zjys.SelectedValue.ToString().Trim(); //总检医生
            if (!object.Equals(null, cmb_tjjl.SelectedValue))
            {
                str_tjjl = cmb_tjjl.SelectedValue.ToString().Trim();                                               //体检结论
            }
            if (!object.Equals(null, cmb_jktj.SelectedValue))
            {
                str_jktj = cmb_jktj.SelectedValue.ToString().Trim(); //健康证条件
            }
            if (rbt_jkyc.Checked == true)                            //健康异常标志
            {
                str_jkycbz = "健康异常";
            }
            if (rbt_zyjkyc.Checked == true)
            {
                str_jkycbz = "职业健康异常";
            }
            if (rbt_null.Checked == true)
            {
                str_jkycbz = "";
            }

            tjjgBiz tjjgbiz1 = new tjjgBiz();
            tjjgbiz1.str_Update_tj_tjdjb(str_tjbh, str_tjcs, dtp_zjrq.Value.ToString(), str_zjys, str_tjjl, str_jktj, rtb_zs.Text, rtb_jy.Text, Program.userid, str_jkycbz, cmb_zytjjl.Text.Trim(), cmb_zyjy.Text.Trim());
            tjjgbiz1.str_Update_tj_jbjlb(str_tjbh, str_tjcs, str_zjys);
            if (txt_fcgy.Text.Trim() != "")
            {
                tjjgbiz1.str_Update_tj_tjdjb(str_tjbh, str_tjcs, dtp_fcrq.Value.ToString(), txt_fcgy.Text.Trim());
            }
            tjjgbiz1.Exec_ArryList();

            MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            str_sumover = "2";

            #region 日志记录
            loginbiz.WriteLog(this.Name.Trim(), "【" + Program.username + "】" + "在电脑【" + ma.HostName() + "】上保存了" + str_tjbh + "的总检结论!IP:" + Program.hostip, Program.username);
            #endregion
        }