コード例 #1
0
        private void Form_excel_Load(object sender, EventArgs e)
        {
            dtp_tjrq.Value = xtbiz.GetServerDate();

            cmb_ywlx.DataSource    = xtbiz.GetXtZd(10);//体检业务
            cmb_ywlx.DisplayMember = "xmmc";
            cmb_ywlx.ValueMember   = "bzdm";
            cmb_ywlx.SelectedValue = "01";
        }
コード例 #2
0
ファイル: Form_tjzyd.cs プロジェクト: wangronghua/PEIS_Autoz
        private void Form_tjbg_Load(object sender, EventArgs e)
        {
            dgv_tjdjb.AutoGenerateColumns = false;
            txt_tjdw.Tag = "";

            str_tjdw = xtbiz.GetXtCsz("TjDwMc");
            str_dwdh = xtbiz.GetXtCsz("TjDwDh");

            cmb_xb.DataSource    = xtbiz.GetXtZd(1);//性别
            cmb_xb.DisplayMember = "xmmc";
            cmb_xb.ValueMember   = "bzdm";
            cmb_xb.SelectedValue = "%";

            dtp_begin.Value = xtbiz.GetServerDate();
            dtp_end.Value   = dtp_begin.Value;

            str_dwczhm  = xtbiz.GetXtCsz("dwczdh").Trim();
            str_dwlxr   = xtbiz.GetXtCsz("dwlxr").Trim();
            str_dwdz    = xtbiz.GetXtCsz("dwdz").Trim();
            str_version = xtbiz.GetXtCsz("version").Trim();
            try
            {
                List <string> listprint = Common.Common.GetPrinterInfo();
                if (listprint != null && listprint.Count > 0)
                {
                    cboxPrinter.Items.AddRange(listprint.ToArray());
                    cboxPrinter.SelectedIndex = 0;
                }
            }
            catch
            { }
        }
コード例 #3
0
        private void Form_tjbg_Load(object sender, EventArgs e)
        {
            if (!Program.sfzc)//没有注册
            {
                if (tjdjbiz.GetTjCounts() > 300)
                {
                    MessageBox.Show("软件试用期已到,请联系供应商: !", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Application.Exit();
                }
            }
            txt_tjdw.Tag = "";


            cmb_xb.DataSource    = xtbiz.GetXtZd(1);//性别
            cmb_xb.DisplayMember = "xmmc";
            cmb_xb.ValueMember   = "bzdm";
            cmb_xb.SelectedValue = "%";
            cmb_bggs.Text        = xtbiz.GetXtCsz("BggsType").Trim();

            dtp_begin.Value = xtbiz.GetServerDate();
            dtp_end.Value   = dtp_begin.Value;
            //选择打印机试试
            try
            {
                List <string> listprint = Common.Common.GetPrinterInfo();
                if (listprint != null && listprint.Count > 0)
                {
                    cboxPrinter.Items.AddRange(listprint.ToArray());
                    cboxPrinter.SelectedIndex = 0;
                }
            }
            catch
            { }
        }
コード例 #4
0
        private void btn_save_Click(object sender, EventArgs e)
        {
            if (richTextBox2.Text == "")
            {
                MessageBox.Show("返回结果为空,不需要导出!", "提示");
                return;
            }


            #region 日志记录
            loginbiz.WriteLog(this.Name.Trim(), "【" + Program.username + "】" + "在电脑【" + ma.HostName() + "】上导出了执行脚本返回结果!IP:" + Program.hostip, Program.username);
            #endregion

            saveFileDialog1.Filter        = "Word文档|*.doc|RTF文档|*.rtf";
            saveFileDialog1.Title         = "执行脚本返回结果导出";
            this.saveFileDialog1.FileName = "执行脚本返回结果" + biz.GetServerDate().ToString("yyyy-MM-dd");
            string path = string.Empty;
            if (saveFileDialog1.ShowDialog() != DialogResult.Cancel)
            {
                path = saveFileDialog1.FileName;
                try
                {
                    richTextBox2.SaveFile(path);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                    return;
                }
                MessageBox.Show("导出返回结果成功!路径:" + path, "提示");
            }
        }
コード例 #5
0
        private void bt_add_Click(object sender, EventArgs e)
        {
            if (txt_xm.Text.Trim() == "")
            {
                MessageBox.Show("请填写姓名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = txt_xm;
                return;
            }
            if (object.Equals(null, cmb_xb.SelectedValue))
            {
                MessageBox.Show("请选择性别!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = cmb_xb;
                return;
            }
            try
            {
                Convert.ToInt32(txt_nl.Text);
            }
            catch
            {
                MessageBox.Show("请填写年龄!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = txt_nl;
                return;
            }
            //if (txt_nl.Text.Trim() == "")
            //{
            //    MessageBox.Show("请填写年龄!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    this.ActiveControl = txt_nl;
            //    return;
            //}
            if (object.Equals(null, cmb_mz.SelectedValue))
            {
                MessageBox.Show("请选择民族!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = cmb_mz;
                return;
            }

            string tjrq = xtbiz.GetServerDate().ToString("yyyy-MM-dd");

            if (str_tjbh == "")
            {
                str_tjbh = xtbiz.GetHmz("tjbh", 1);
                str_tjcs = "1";

                if (xtbiz.GetXtCsz("djlshgz") == "2")  //特殊规则YYMMDD+5位
                {
                    str_djlsh = xtbiz.GetHmz("djlsh", 1);
                }
                else
                {
                    str_djlsh = tjdjbiz.Get_proc_get_djlsh(tjrq, Program.userid);
                }
            }
            tjjgbiz.Insert_tj_tjdjb(str_djlsh, str_tjbh, str_tjcs, txt_xm.Text.Trim(), cmb_xb.SelectedValue.ToString(), txt_nl.Text.Trim(), cmb_mz.SelectedValue.ToString(), txt_mobile.Text.Trim(), "05", tjrq, txt_sfzh.Text.Trim());

            this.DialogResult = DialogResult.OK;
        }
コード例 #6
0
ファイル: Form_jbfbtj.cs プロジェクト: wangronghua/PEIS_Autoz
        private void Form_yxjghz_Load(object sender, EventArgs e)
        {
            dtp_begin.Value = xtbiz.GetServerDate();
            dtp_end.Value   = dtp_begin.Value;

            cmb_rylx.DataSource    = xtbiz.GetXtZd(8);//人员类别
            cmb_rylx.DisplayMember = "xmmc";
            cmb_rylx.ValueMember   = "bzdm";
            cmb_rylx.SelectedIndex = -1;
        }
コード例 #7
0
        private void Form_tjbg_Load(object sender, EventArgs e)
        {
            txt_tjdw.Tag = "";

            str_tjdw = xtbiz.GetXtCsz("TjDwMc");
            str_dwdh = xtbiz.GetXtCsz("TjDwDh");

            dtp_begin.Value = xtbiz.GetServerDate();
            dtp_end.Value   = dtp_begin.Value;
        }
コード例 #8
0
ファイル: Form_tjjgmx.cs プロジェクト: wangronghua/PEIS_Autoz
        private void Form_yxjghz_Load(object sender, EventArgs e)
        {
            dtp_begin.Value = xtbiz.GetServerDate();
            dtp_end.Value   = dtp_begin.Value;

            cmb_xmmb.SelectedIndexChanged -= new EventHandler(cmb_xmmb_SelectedIndexChanged);
            cmb_xmmb.DataSource            = ywszbiz.Get_tj_xmmb_hd();
            cmb_xmmb.ValueMember           = "bh";
            cmb_xmmb.DisplayMember         = "mbmc";
            cmb_xmmb.SelectedIndex         = -1;
            cmb_xmmb.SelectedIndexChanged += new EventHandler(cmb_xmmb_SelectedIndexChanged);
        }
コード例 #9
0
ファイル: Form_zhxmtz.cs プロジェクト: wangronghua/PEIS_Autoz
        private void Form_tjbg_Load(object sender, EventArgs e)
        {
            txt_tjdw.Tag = "";

            cmb_xb.DataSource    = xtbiz.GetXtZd(1);//性别
            cmb_xb.DisplayMember = "xmmc";
            cmb_xb.ValueMember   = "bzdm";
            cmb_xb.SelectedValue = "%";

            dtp_begin.Value = xtbiz.GetServerDate();
            dtp_end.Value   = dtp_begin.Value;
        }
コード例 #10
0
        void LoadDefault()
        {
            //默认折扣类型:1金额,2比例
            string str_mrzklx = xtbiz.GetXtCsz("mrzklx");

            if (str_mrzklx == "1")
            {
                rbt_je.Checked = true;
            }
            if (str_mrzklx == "2")
            {
                rbt_bl.Checked = true;
            }

            //默认收费日期:登录日期
            int mrsfrq = Convert.ToInt16(xtbiz.GetXtCsz("mrsfrq"));

            if (Convert.ToInt16(mrsfrq) >= 0)   //正值
            {
                dtp_tjrq.Value = xtbiz.GetServerDate();
            }
            else                                 //负值
            {
                dtp_tjrq.Value = xtbiz.GetServerDate().AddDays(mrsfrq);
            }

            //办证收费金额默认:1-不可修改,0-可以修改
            string str_bzjems = xtbiz.GetXtCsz("bzsfjems");

            if (str_bzjems == "1")
            {
                txt_bzsfje.ReadOnly = true;
            }
            if (str_bzjems == "0")
            {
                txt_bzsfje.ReadOnly = false;
            }

            dgv_tjdjb.DataSource = tjdjbiz.Get_TJ_TJDJB(dtp_tjrq.Value.ToString("yyyy-MM-dd"), txt_dah.Text.Trim(), txt_xm.Text.Trim(), "0", "");
        }
コード例 #11
0
ファイル: Form_tjsqd.cs プロジェクト: wangronghua/PEIS_Autoz
        private void Form_tjbg_Load(object sender, EventArgs e)
        {
            txt_tjdw.Text = Program.now_tjdwmc;//by zhz
            txt_tjdw.Tag  = Program.now_tjdwid;

            str_tjdw = xtbiz.GetXtCsz("TjDwMc");

            cmb_xb.DataSource    = xtbiz.GetXtZd(1);//性别
            cmb_xb.DisplayMember = "xmmc";
            cmb_xb.ValueMember   = "bzdm";
            cmb_xb.SelectedValue = "%";

            dtp_begin.Value = xtbiz.GetServerDate();
            dtp_end.Value   = dtp_begin.Value;
        }
コード例 #12
0
 private void Form_tycx_Load(object sender, EventArgs e)
 {
     DataBind();
     if (str_tjrq == "")
     {
         dtp_begin.Value = xtbiz.GetServerDate();
     }
     else
     {
         dtp_begin.Value = Convert.ToDateTime(str_tjrq);
     }
     dtp_end.Value        = dtp_begin.Value;
     txt_tjdw.Tag         = "";
     txt_tjdw.Text        = "";
     dgv_tjdjb.DataSource = tjglbiz.Get_TJ_TJDJB(dtp_begin.Value.ToString("yyyy-MM-dd"), dtp_end.Value.ToString("yyyy-MM-dd"), "", "", "", "0", "");
     ChargeColor();
 }
コード例 #13
0
 private void Form_yxjghz_Load(object sender, EventArgs e)
 {
     dtp_begin.Value = xtbiz.GetServerDate();
     dtp_end.Value   = dtp_begin.Value;
 }
コード例 #14
0
ファイル: Form_tjrqxz.cs プロジェクト: wangronghua/PEIS_Autoz
 private void Form_tjrqxz_Load(object sender, EventArgs e)
 {
     dtp_tjdjrq.Value = xtbiz.GetServerDate();
 }
コード例 #15
0
        private void button2_Click(object sender, EventArgs e)
        {
            #region  收费检查
            string str_bzsfxz = xtbiz.GetXtCsz("bzsfxz"); //办证收费流程限制
            if (str_bzsfxz == "1" && str_sfbz == "1")     //限制
            {
                int sl = tjdjBiz.TjSfCx(str_tjbh, str_tjcs);
                if (sl <= 0)    //未收费
                {
                    MessageBox.Show("本单位进行了财务流程控制,请先交费!", "提示");
                    return;
                }
            }
            #endregion

            #region 检查输入
            if (txtJkzXm.Text.Trim() == "")
            {
                MessageBox.Show("请输入姓名!", "提示");
                this.ActiveControl = txtJkzXm;
                return;
            }
            if (txtNl.Text.Trim() == "")
            {
                MessageBox.Show("请输入年龄!", "提示");
                this.ActiveControl = txtNl;
                return;
            }
            if (txtXb.Text.Trim() == "")
            {
                MessageBox.Show("请输入性别!", "提示");
                this.ActiveControl = txtXb;
                return;
            }
            if (txtTjbh.Text.Trim() == "")
            {
                MessageBox.Show("请输入体检编号!", "提示");
                this.ActiveControl = txtTjbh;
                return;
            }
            if (txtJdhdw.Text.Trim() == "")
            {
                MessageBox.Show("请输入街道或单位地址!", "提示");
                this.ActiveControl = txtJdhdw;
                return;
            }
            if (txt_yxq.Text.Trim() == "")
            {
                MessageBox.Show("请输入有效期!", "提示");
                this.ActiveControl = txt_yxq;
                return;
            }
            if (cmbHy.Text.Trim() == "")
            {
                MessageBox.Show("请选择行业!", "提示");
                this.ActiveControl = cmbHy;
                return;
            }
            if (txt_gz.Text.Trim() == "")
            {
                MessageBox.Show("请选择工种!", "提示");
                this.ActiveControl = txt_gz;
                return;
            }
            if (cmbCylx.Text.Trim() == "")
            {
                MessageBox.Show("请选择所属证类!", "提示");
                this.ActiveControl = cmbCylx;
                return;
            }
            if (txt_yxq.Text.Trim() != "1" && txt_yxq.Text.Trim() != "2")
            {
                MessageBox.Show("健康证有效期为1年或2年!", "提示");
                this.ActiveControl = txt_yxq;
                return;
            }
            #endregion

            #region 保存
            string str_bfrq = "";
            if (ckb_bfbz.Checked == true)    //如果是补发证
            {
                str_bfrq = dtp_fzrq.Value.ToString("yyyy-MM-dd");
            }
            else
            {
                str_bfrq = xtbiz.GetServerDate().ToString("yyyy-MM-dd");
            }

            if (str_jkzbh == "0")  //新增
            {
                string jkzbh = xtbiz.GetHmz("tj_jkzbh", 1);
                if (jkzbh.Length == 1)
                {
                    jkzbh = "0000" + jkzbh;
                }
                if (jkzbh.Length == 2)
                {
                    jkzbh = "000" + jkzbh;
                }
                if (jkzbh.Length == 3)
                {
                    jkzbh = "00" + jkzbh;
                }
                if (jkzbh.Length == 4)
                {
                    jkzbh = "0" + jkzbh;
                }

                string jkzbm = xtbiz.GetXtCsz("jkzbm");   //20111111
                jkzbh = jkzbm + "  " + cmbCylx.Text.Trim() + str_bfrq.Replace("-", "").Substring(0, 4) + jkzbh;

                try
                {
                    int i = tjdjBiz.TjJkzSave(jkzbh, str_tjbh, str_tjcs, str_xm, str_nl, str_xb, Program.yljgmc, str_bfrq, Program.userid, cmbHy.Text.Trim(), cmbCylx.Text.Trim(), str_bfrq, Convert.ToDateTime(str_bfrq).AddYears(Convert.ToInt16(txt_yxq.Text.Trim())).ToString("yyyy-MM-dd"), txtHjd.Text.Trim(), txtXjdz.Text.Trim(), txtJdhdw.Text.Trim(), txt_gz.Text.Trim());
                    if (i > 0)
                    {
                        MessageBox.Show("保存成功!", "提示");
                        #region 日志记录
                        loginbiz.WriteLog(this.Name.Trim(), "【" + Program.username + "】" + "在电脑【" + ma.HostName() + "】上保存" + str_tjbh + "的健康证信息成功!IP:" + Program.hostip, Program.username);
                        #endregion
                        btnSearch_Click(null, null);
                        //Init();
                        txt_yxq.ReadOnly = true;
                        txtTjbh.ReadOnly = true;
                        //cbx_gz.Enabled = true;
                        ckb_bfbz.Checked  = false;
                        txt_gz.ReadOnly   = true;
                        txtJdhdw.ReadOnly = true;
                        txtJkzXm.ReadOnly = true;
                        txtXb.ReadOnly    = true;
                        txtNl.ReadOnly    = true;
                        txtTjbh.ReadOnly  = true;
                    }
                }
                catch (Exception ex)
                {
                    #region 日志记录
                    loginbiz.WriteLogErr(this.Name.Trim(), "【" + Program.username + "】" + "在电脑【" + ma.HostName() + "】上保存" + str_tjbh + "的健康证信息失败,原因:" + ex.ToString() + "IP:" + Program.hostip, Program.username);
                    #endregion
                    MessageBox.Show("" + ex.ToString());
                    return;
                }
            }
            else         //修改
            {
                try
                {
                    int j = tjdjBiz.TjJkzSaveAs(str_jkzbh, str_jkzbh, str_tjbh, str_tjcs, str_xm, str_nl, str_xb, Program.yljgmc, str_bfrq, Program.userid, cmbHy.Text.Trim(), cmbCylx.Text.Trim(), str_bfrq, Convert.ToDateTime(str_bfrq).AddYears(Convert.ToInt16(txt_yxq.Text.Trim())).ToString("yyyy-MM-dd"), txtHjd.Text.Trim(), txtXjdz.Text.Trim(), txtJdhdw.Text.Trim());
                    if (j > 0)
                    {
                        MessageBox.Show("保存成功!", "提示");
                        #region 日志记录
                        loginbiz.WriteLog(this.Name.Trim(), "【" + Program.username + "】" + "在电脑【" + ma.HostName() + "】上修改" + str_tjbh + "的健康证信息成功!IP:" + Program.hostip, Program.username);
                        #endregion
                        btnSearch_Click(null, null);
                        Init();
                    }
                }
                catch (Exception ex)
                {
                    #region 日志记录
                    loginbiz.WriteLogErr(this.Name.Trim(), "【" + Program.username + "】" + "在电脑【" + ma.HostName() + "】上修改" + str_tjbh + "的健康证信息失败,原因:" + ex.ToString() + "IP:" + Program.hostip, Program.username);
                    #endregion
                    MessageBox.Show("" + ex.ToString());
                    return;
                }
            }
            #endregion
        }
コード例 #16
0
        void TJDJB_DataBind(string tjbh, string tjcs)
        {
            dt_jbjlb = tjjgbiz.Get_TJ_JBJLB(tjbh, tjcs);

            DataTable dt = tjjgbiz.Get_V_TJ_TJDJB(str_tjbh, str_tjcs);

            txt_dw.Text    = dt.Rows[0]["dwmc"].ToString().Trim();
            txt_djlsh.Text = dt.Rows[0]["djlsh"].ToString().Trim();
            txt_tjbh.Text  = dt.Rows[0]["tjbh"].ToString().Trim();
            txt_tjcs.Text  = dt.Rows[0]["tjcs"].ToString().Trim();
            txt_xm.Text    = dt.Rows[0]["xm"].ToString().Trim();
            txt_xb.Text    = dt.Rows[0]["xb"].ToString().Trim();
            txt_nl.Text    = dt.Rows[0]["nl"].ToString().Trim();
            txt_sfzh.Text  = dt.Rows[0]["sfzh"].ToString().Trim();
            rtb_jy.Text    = dt.Rows[0]["jy"].ToString().Trim();
            rtb_zs.Text    = dt.Rows[0]["zs"].ToString().Trim();
            str_czy        = dt.Rows[0]["czy"].ToString().Trim();    //操作员
            txt_whys.Text  = dt.Rows[0]["whysmc"].ToString().Trim(); //危害因素

            if (dt.Rows[0]["jkycbz"].ToString().Trim() == "健康异常")    //健康异常标志
            {
                rbt_jkyc.Checked   = true;
                rbt_zyjkyc.Checked = false;
                rbt_null.Checked   = false;
            }
            if (dt.Rows[0]["jkycbz"].ToString().Trim() == "职业健康异常")
            {
                rbt_jkyc.Checked   = false;
                rbt_zyjkyc.Checked = true;
                rbt_null.Checked   = false;
            }
            if (dt.Rows[0]["jkycbz"].ToString().Trim() == "" && str_sumover == "2")
            {
                rbt_jkyc.Checked   = false;
                rbt_zyjkyc.Checked = false;
                rbt_null.Checked   = true;
            }
            cmb_zytjjl.Text = dt.Rows[0]["zytjjl"].ToString().Trim(); //职业体检结论
            cmb_zyjy.Text   = dt.Rows[0]["zytjjy"].ToString().Trim(); //职业体检建议

            try
            {
                dtp_zjrq.Value         = Convert.ToDateTime(dt.Rows[0]["jcrq"].ToString().Trim());
                cmb_zjys.SelectedValue = dt.Rows[0]["jcys"].ToString().Trim();
                cmb_tjjl.SelectedValue = dt.Rows[0]["tjjl"].ToString().Trim(); //体检结论
                cmb_jktj.SelectedValue = dt.Rows[0]["jktj"].ToString().Trim(); //健康条件
            }
            catch { }

            //头像处理----------------------------------------------------------------------
            try
            {
                MemoryStream buf       = new MemoryStream((byte[])dt.Rows[0]["picture"]);
                Image        showimage = Image.FromStream(buf, true);
                pictureBox1.Image = showimage;
            }
            catch
            {
                pictureBox1.Image = null;
            }


            if (str_sumover == "2")
            {
                dtp_zjrq.Enabled = false;
                cmb_zjys.Enabled = false;
                cmb_tjjl.Enabled = false;
                cmb_jktj.Enabled = false;
                dtp_fcrq.Enabled = false;
                txt_fcgy.Enabled = false;
                rtb_jy.Enabled   = false;
                rtb_zs.Enabled   = false;
            }
            else
            {
                dtp_zjrq.Enabled = true;
                cmb_zjys.Enabled = true;
                cmb_tjjl.Enabled = true;
                cmb_jktj.Enabled = true;
                dtp_fcrq.Enabled = true;
                txt_fcgy.Enabled = true;
                rtb_jy.Enabled   = true;
                rtb_zs.Enabled   = true;
                dtp_zjrq.Value   = xtbiz.GetServerDate();
                dtp_fcrq.Value   = dtp_zjrq.Value;
            }
            if (rtb_zs.Text.Trim() == "" && str_sumover != "2")//自动组合科室小结,获取诊断建议
            {
                ScZsJy(dt_jbjlb);
            }
        }