コード例 #1
0
        private void dgvJbxx_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            Init();
            DataGridViewRow dgr = dgvJbxx.SelectedRows[0];

            str_tjbh       = dgr.Cells["tjbh"].Value.ToString().Trim();
            str_tjcs       = dgr.Cells["tjcs"].Value.ToString().Trim();
            str_xm         = dgr.Cells["xm"].Value.ToString().Trim();
            str_xb         = dgr.Cells["xb"].Value.ToString().Trim();
            str_nl         = dgr.Cells["nl"].Value.ToString().Trim();
            str_sfzh       = dgr.Cells["sfzh"].Value.ToString().Trim();
            str_jkzbh      = dgr.Cells["jkzbh"].Value.ToString().Trim();
            txtNl.Text     = str_nl;
            txtJkzXm.Text  = str_xm;
            txtXb.Text     = str_xb;
            txtTjbh.Text   = str_tjbh;
            txtSfzh.Text   = str_sfzh;
            txtXjdz.Text   = dgr.Cells["xjd"].Value.ToString().Trim();
            txtHjd.Text    = dgr.Cells["hjd"].Value.ToString().Trim();
            txtJdhdw.Text  = dgr.Cells["dwmc"].Value.ToString().Trim();
            txgtJkzbh.Text = dgr.Cells["jkzbh"].Value.ToString().Trim();
            cmbCylx.Text   = dgr.Cells["hylx"].Value.ToString().Trim();
            cmbHy.Text     = dgr.Cells["hy"].Value.ToString().Trim();
            dtp_fzrq.Text  = dgr.Cells["fzrq"].Value.ToString().Trim();
            str_gz         = dgr.Cells["gz"].Value.ToString().Trim();
            str_sfbz       = dgr.Cells["sfbz"].Value.ToString().Trim(); //必须收费标志
            txt_gz.Text    = str_gz;

            cmbHy.SelectedValue   = dgr.Cells["bzhy"].Value.ToString().Trim();
            cmbCylx.SelectedValue = dgr.Cells["sszl"].Value.ToString().Trim();

            //工种
            if (str_gz == "0" || str_gz == "")   //登记时没有选择工种
            {
                MessageBox.Show("该体检者在登记时无工种信息!", "提示");
                return;
            }


            #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
        }
コード例 #2
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;
        }
コード例 #3
0
        private void Form_tjbg_Load(object sender, EventArgs e)
        {
            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;
        }
コード例 #4
0
        private void Form_reg_Load(object sender, EventArgs e)
        {
            txt_jqm.Text = machine.GetCpuInfo();
            DataTable dt_xt_reg = xtggbiz.Get_xt_reg();

            if (dt_xt_reg.Rows.Count < 1)
            {
                return;
            }
            string str_code = dt_xt_reg.Rows[0]["reg"].ToString().Trim();

            try
            {
                //str_code = rijndael_.Decrypt(str_code);
                str_code       = jm.DecryptDES(str_code, "@xxsoft@");
                txt_yhmc1.Text = str_code.Split('|')[1];
                txt_jzrq.Text  = str_code.Split('|')[3];
                txt_yhsl.Text  = str_code.Split('|')[2];
            }
            catch
            {
                //MessageBox.Show("系统注册码异常,请联系供应商:!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Program.sfzc   = false;
                txt_yhmc1.Text = xtbiz.GetXtCsz("TjDwMc");//单位名称
                //Application.Exit();
            }
        }
コード例 #5
0
        private void dgv_tjdjb_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            DataGridViewRow dgr = dgv_tjdjb.SelectedRows[0];

            str_tjbh    = dgr.Cells["tjbh"].Value.ToString().Trim();
            str_tjcs    = dgr.Cells["tjcs"].Value.ToString().Trim();
            str_sumover = dgr.Cells["sumover"].Value.ToString().Trim();
            strDjlsh    = dgr.Cells["djlsh"].Value.ToString().Trim();

            #region  收费检查
            string str_sfbz   = dgr.Cells["sfbz"].Value.ToString().Trim();
            string str_bzsfxz = xtbiz.GetXtCsz("bzsfxz"); //办证收费流程限制
            if (str_bzsfxz == "1" && str_sfbz == "1")     //限制
            {
                int sl = tjglbiz.TjSfCx(str_tjbh, str_tjcs);
                if (sl <= 0)    //未收费
                {
                    MessageBox.Show("本单位进行了财务流程控制,请先交费!", "提示");
                    return;
                }
            }
            #endregion
            this.DialogResult = DialogResult.OK;
        }
コード例 #6
0
        private void DataBind()
        {
            str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码
            //检验小组获取
            cmb_jydyxz.DataSource    = lisbiz.Get_PGroup();
            cmb_jydyxz.DisplayMember = "CName";
            cmb_jydyxz.ValueMember   = "SectionNo";
            cmb_jydyxz.SelectedValue = -1;

            //获取组合项目
            DataTable dt_tj_lclxb = lisbiz.Get_TJ_LCLXB();

            foreach (DataRow dr in dt_tj_lclxb.Rows)
            {
                TreeNode node1    = new TreeNode(dr["mc"].ToString());
                string   str_lclx = dr["lclx"].ToString();

                DataTable dt_tj_tjxmb = lisbiz.Get_TJ_ZHXM_HD(str_JykCode, str_lclx);
                foreach (DataRow drs in dt_tj_tjxmb.Rows)
                {
                    TreeNode node2 = new TreeNode();
                    node2.Text = drs["mc"].ToString().Trim();
                    node2.Tag  = drs["bh"].ToString().Trim();
                    node1.Nodes.Add(node2);
                }

                tv_jyzhxm.Nodes.Add(node1);
            }
        }
コード例 #7
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
            { }
        }
コード例 #8
0
        void DataBind()
        {
            tv_tjlxb.Nodes.Clear();
            str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码

            TreeNode node = new TreeNode("体检科室");

            node.Tag = "0";
            DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb();

            foreach (DataRow dr in dt_tjlxb.Rows)
            {
                string   str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室)
                TreeNode node1    = new TreeNode(dr["mc"].ToString().Trim());
                node1.Tag = str_lxbh;

                if (str_JykCode == str_lxbh)
                {
                    DataTable dt_lclxb = ywszbiz.Get_tj_lclxb();
                    foreach (DataRow dr3 in dt_lclxb.Rows)
                    {
                        TreeNode node3 = new TreeNode(dr3["mc"].ToString().Trim());
                        node3.Tag = dr3["lclx"].ToString().Trim();

                        DataTable dt_tj_zhxm = ywszbiz.Get_tj_zhxm_hd(str_lxbh, node3.Tag.ToString());
                        foreach (DataRow dr4 in dt_tj_zhxm.Rows)
                        {
                            TreeNode node4 = new TreeNode(dr4["mc"].ToString().Trim());
                            node4.Tag = dr4["bh"].ToString().Trim();  //编号
                            if (dr4["yxbz"].ToString().Trim() == "0") //停用
                            {
                                node4.ForeColor = Color.Red;
                            }
                            node3.Nodes.Add(node4);
                        }
                        node1.Nodes.Add(node3);
                    }
                }
                else
                {
                    DataTable dt_tj_zhxm = ywszbiz.Get_tj_zhxm_hd(str_lxbh);
                    foreach (DataRow dr1 in dt_tj_zhxm.Rows)
                    {
                        TreeNode node2 = new TreeNode(dr1["mc"].ToString().Trim());
                        node2.Tag = dr1["bh"].ToString().Trim();
                        if (dr1["yxbz"].ToString().Trim() == "0")//停用
                        {
                            node2.ForeColor = Color.Red;
                        }
                        node1.Nodes.Add(node2);
                    }
                }

                node.Nodes.Add(node1);
            }
            tv_tjlxb.Nodes.Add(node);
        }
コード例 #9
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;
        }
コード例 #10
0
ファイル: Form_cjjgwh.cs プロジェクト: wangronghua/PEIS_Autoz
        void DataBind_TJLX()
        {
            tv_tjlxb.Nodes.Clear();
            str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码

            TreeNode node = new TreeNode("体检科室");

            node.Tag = "0";
            DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb();

            foreach (DataRow dr in dt_tjlxb.Rows)
            {
                string   str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室)
                TreeNode node1    = new TreeNode(dr["mc"].ToString().Trim());
                node1.Tag = str_lxbh;

                if (str_JykCode == str_lxbh)
                {
                    DataTable dt_lclxb = ywszbiz.Get_tj_lclxb();
                    foreach (DataRow dr3 in dt_lclxb.Rows)
                    {
                        TreeNode node3 = new TreeNode(dr3["mc"].ToString().Trim());
                        node3.Tag = dr3["lclx"].ToString().Trim();

                        DataTable dt_tjxmb = ywszbiz.Get_tj_tjxmb(str_lxbh, node3.Tag.ToString());
                        foreach (DataRow dr4 in dt_tjxmb.Rows)
                        {
                            TreeNode node4 = new TreeNode(dr4["mc"].ToString().Trim());
                            node4.Tag = dr4["tjxm"].ToString().Trim();
                            node3.Nodes.Add(node4);
                        }
                        node1.Nodes.Add(node3);
                    }
                }
                else
                {
                    DataTable dt_tjxmb = ywszbiz.Get_tj_tjxmb(str_lxbh);
                    foreach (DataRow dr1 in dt_tjxmb.Rows)
                    {
                        TreeNode node2 = new TreeNode(dr1["mc"].ToString().Trim());
                        node2.Tag = dr1["tjxm"].ToString().Trim();
                        node1.Nodes.Add(node2);
                    }
                }

                node.Nodes.Add(node1);
            }
            tv_tjlxb.Nodes.Add(node);
            AddImage(node);

            cmb_xb.DataSource    = xtbiz.GetXtZd(1);//性别
            cmb_xb.DisplayMember = "xmmc";
            cmb_xb.ValueMember   = "bzdm";
        }
コード例 #11
0
        private void Form_report_Load(object sender, EventArgs e)
        {
            BarcodeControl barcode = new BarcodeControl();

            barcode.BarcodeType = BarcodeType.CODE128C;
            barcode.Data        = str_djlsh;
            barcode.CopyRight   = "";
            MemoryStream stream = new MemoryStream();

            barcode.MakeImage(ImageFormat.Png, 1, 50, true, false, null, stream);
            Bitmap myimge = new Bitmap(stream);

            string str_path = Application.StartupPath + @"/barcode.png";

            myimge.Save(str_path, ImageFormat.Png);
            str_path = "file:///" + str_path;
            myimge.Dispose();                                       //201203

            string str_dwlxr   = xtBiz.GetXtCsz("dwlxr").Trim();    //单位联系人
            string str_dwdz    = xtBiz.GetXtCsz("dwdz").Trim();     //单位地址
            string str_dwdh    = xtBiz.GetXtCsz("tjdwdh").Trim();   //体检单位电话
            string str_tjzgzbh = xtBiz.GetXtCsz("zytjzgbh").Trim(); //职业健康体检资格编号

            //string str_dwlxr ="hh";//单位联系人
            //string str_dwdz = "hh";//单位地址
            //string str_dwdh = "hh";//体检单位电话
            //string str_tjzgzbh = "hh";//职业健康体检资格编号


            //LocalReport report = new LocalReport();
            reportView.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(report_SubreportProcessing);
            string title = "职业健康检查表";

            DataTable dt2 = GetZybRyxx(strTjbh, strTjcs);

            reportView.LocalReport.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_zyb_jkda_new.rdlc";
            reportView.LocalReport.EnableExternalImages = true;
            ReportParameter rp1 = new ReportParameter("dqrq", xtBiz.GetDataNow().ToString("yyyy-MM-dd"));
            ReportParameter rp2 = new ReportParameter("title", title);
            ReportParameter rp3 = new ReportParameter("bbmc", Program.reg_dwmc);
            ReportParameter rp4 = new ReportParameter("barcode", str_path);
            ReportParameter rp5 = new ReportParameter("dz", str_dwdz);
            ReportParameter rp6 = new ReportParameter("dh", str_dwdh);
            ReportParameter rp7 = new ReportParameter("lxr", str_dwlxr);
            ReportParameter rp8 = new ReportParameter("zgbh", str_tjzgzbh);

            reportView.LocalReport.DataSources.Clear();
            reportView.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 });
            reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_zyb_ryxx", dt2));
            this.reportView.RefreshReport();
        }
コード例 #12
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", "");
        }
コード例 #13
0
ファイル: Form_sqdsx.cs プロジェクト: wangronghua/PEIS_Autoz
        private void Form_sqdsz_Load(object sender, EventArgs e)
        {
            DataBind();
            cmb_bblx.DataSource    = xtbiz.GetXtZd(6);//标本类型
            cmb_bblx.DisplayMember = "xmmc";
            cmb_bblx.ValueMember   = "bzdm";

            cmb_jcjylx.SelectedIndexChanged -= new EventHandler(cmb_jcjylx_SelectedIndexChanged);
            cmb_jcjylx.DataSource            = xtbiz.GetXtZd(9);//检查类型
            cmb_jcjylx.DisplayMember         = "xmmc";
            cmb_jcjylx.ValueMember           = "bzdm";
            cmb_jcjylx.SelectedIndexChanged += new EventHandler(cmb_jcjylx_SelectedIndexChanged);

            str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码
        }
コード例 #14
0
ファイル: Form_tjxmsz.cs プロジェクト: wangronghua/PEIS_Autoz
        void DataBind()
        {
            tv_tjlxb.Nodes.Clear();
            str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码

            AddTree();

            cmb_ksmc.SelectedIndexChanged -= new EventHandler(cmb_ksmc_SelectedIndexChanged);
            cmb_ksmc.DataSource            = ywszbiz.Get_tj_tjlxb();
            cmb_ksmc.DisplayMember         = "mc";
            cmb_ksmc.ValueMember           = "lxbh";
            cmb_ksmc.SelectedIndexChanged += new EventHandler(cmb_ksmc_SelectedIndexChanged);

            cmb_xb.DataSource    = xtbiz.GetXtZd(1);//性别
            cmb_xb.DisplayMember = "xmmc";
            cmb_xb.ValueMember   = "bzdm";
        }
コード例 #15
0
        void DataBind_TJLX()
        {
            tv_tjlxb.Nodes.Clear();
            str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码

            MyTreeNode node = new MyTreeNode();

            node.Text = "体检科室";
            node.Tag  = ""; //科室类型
            node.Str  = ""; //临床类型

            DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb();

            foreach (DataRow dr in dt_tjlxb.Rows)
            {
                string     str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室)
                MyTreeNode node1    = new MyTreeNode();
                node1.Text = dr["mc"].ToString().Trim();
                node1.Tag  = str_lxbh; //科室类型
                node1.Str  = "";       //临床类型,检验科之外的临床类型全部为空
                if (str_JykCode == str_lxbh)
                {
                    DataTable dt_lclxb = ywszbiz.Get_tj_lclxb();
                    foreach (DataRow dr2 in dt_lclxb.Rows)
                    {
                        MyTreeNode node2 = new MyTreeNode();
                        node2.Text = dr2["mc"].ToString().Trim();
                        node2.Tag  = str_lxbh;                      //科室类型
                        node2.Str  = dr2["lclx"].ToString().Trim(); //临床类型
                        node1.Nodes.Add(node2);
                    }
                }

                node.Nodes.Add(node1);
            }
            tv_tjlxb.Nodes.Add(node);

            new Common.Common().AddImage(node);
        }
コード例 #16
0
        private void DataBind()
        {
            str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码

            DataTable dt_tj_lclxb = lisbiz.Get_TJ_LCLXB();

            foreach (DataRow dr in dt_tj_lclxb.Rows)
            {
                TreeNode node1    = new TreeNode(dr["mc"].ToString());
                string   str_lclx = dr["lclx"].ToString();

                DataTable dt_tj_tjxmb = lisbiz.Get_TJ_TJXMB(str_JykCode, str_lclx);
                foreach (DataRow drs in dt_tj_tjxmb.Rows)
                {
                    TreeNode node2 = new TreeNode();
                    node2.Text = drs["mc"].ToString();
                    node2.Tag  = drs["tjxm"].ToString();
                    node1.Nodes.Add(node2);
                }

                tv_jyxm.Nodes.Add(node1);
            }
        }
コード例 #17
0
ファイル: About.cs プロジェクト: wangronghua/PEIS_Autoz
        private void About_Load(object sender, EventArgs e)
        {
            this.textBoxDescription.Text = "说明:                                    销售热线:                       邮    箱:      ";
            xtBiz  biz         = new xtBiz();
            string str_version = biz.GetXtCsz("version").Trim();

            if (str_version == "2")
            {
                labelProductName.Text = "产品名称:健康体检报告管理系统";
            }
            if (str_version == "1")
            {
                labelProductName.Text = "产品名称:职业健康体检报告系统";
            }
            if (str_version == "3")
            {
                labelProductName.Text = "产品名称:从业体检报告系统";
            }
            if (str_version == "99")
            {
                labelProductName.Text = "产品名称:体检综合信息平台";
            }
        }
コード例 #18
0
ファイル: Form_zhxmsz.cs プロジェクト: wangronghua/PEIS_Autoz
        void DataBind()
        {
            tv_tjlxb.Nodes.Clear();
            str_JykCode = xtbiz.GetXtCsz("JykCode");//检验科代码

            TreeNode node = new TreeNode("体检科室");

            node.Tag = "0";
            DataTable dt_tjlxb = ywszbiz.Get_tj_tjlxb();

            foreach (DataRow dr in dt_tjlxb.Rows)
            {
                string   str_lxbh = dr["lxbh"].ToString().Trim();//类型编号(科室)
                TreeNode node1    = new TreeNode(dr["mc"].ToString().Trim());
                node1.Tag = str_lxbh;

                if (str_JykCode == str_lxbh)
                {
                    DataTable dt_lclxb = ywszbiz.Get_tj_lclxb();
                    foreach (DataRow dr3 in dt_lclxb.Rows)
                    {
                        TreeNode node3 = new TreeNode(dr3["mc"].ToString().Trim());
                        node3.Tag = dr3["lclx"].ToString().Trim();

                        DataTable dt_tj_tjlxb = ywszbiz.Get_tj_zhxm_hd(str_lxbh, node3.Tag.ToString());
                        foreach (DataRow dr4 in dt_tj_tjlxb.Rows)
                        {
                            TreeNode node4 = new TreeNode(dr4["mc"].ToString().Trim());
                            node4.Tag = dr4["bh"].ToString().Trim();  //编号
                            if (dr4["yxbz"].ToString().Trim() == "0") //停用
                            {
                                node4.ForeColor = Color.Red;
                            }
                            node3.Nodes.Add(node4);
                        }
                        node1.Nodes.Add(node3);
                    }
                }
                else
                {
                    DataTable dt_tjxmb = ywszbiz.Get_tj_zhxm_hd(str_lxbh);
                    foreach (DataRow dr1 in dt_tjxmb.Rows)
                    {
                        TreeNode node2 = new TreeNode(dr1["mc"].ToString().Trim());
                        node2.Tag = dr1["bh"].ToString().Trim();
                        if (dr1["yxbz"].ToString().Trim() == "0")//停用
                        {
                            node2.ForeColor = Color.Red;
                        }
                        node1.Nodes.Add(node2);
                    }
                }

                node.Nodes.Add(node1);
            }
            tv_tjlxb.Nodes.Add(node);
            AddImage(node);

            cmb_ksmc.SelectedIndexChanged -= new EventHandler(cmb_ksmc_SelectedIndexChanged);
            cmb_ksmc.DataSource            = ywszbiz.Get_tj_tjlxb();
            cmb_ksmc.DisplayMember         = "mc";
            cmb_ksmc.ValueMember           = "lxbh";
            cmb_ksmc.SelectedIndexChanged += new EventHandler(cmb_ksmc_SelectedIndexChanged);

            cmb_bblx.DataSource    = xtbiz.GetXtZd(6);//标本类型
            cmb_bblx.DisplayMember = "xmmc";
            cmb_bblx.ValueMember   = "bzdm";

            cmb_jyjclx.DataSource    = xtbiz.GetXtZd(9);//检查类型
            cmb_jyjclx.DisplayMember = "xmmc";
            cmb_jyjclx.ValueMember   = "bzdm";

            cmb_sflb.DataSource    = xtbiz.GetXtZd(7);//收费类型
            cmb_sflb.DisplayMember = "xmmc";
            cmb_sflb.ValueMember   = "bzdm";
        }
コード例 #19
0
        private void bt_input_Click(object sender, EventArgs e)
        {
            if (!Check_DGV_Select())
            {
                MessageBox.Show("请选择需要导入的人员名单!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (txt_tjdw.Text.Trim() == "")
            {
                MessageBox.Show("请选择需要导入单位!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = bt_tjdw;
                return;
            }
            if (object.Equals(null, cmb_fz.SelectedValue))
            {
                MessageBox.Show("请选择分组!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = cmb_fz;
                return;
            }
            if (object.Equals(null, cmb_ywlx.SelectedValue))
            {
                MessageBox.Show("请选择体检业务类型!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = bt_tjdw;
                return;
            }
            string str_tjrq = dtp_tjrq.Value.ToString("yyyy-MM-dd");

            foreach (DataGridViewRow dgr in dgv_excel.Rows)
            {
                string str_dwbh = txt_tjdw.Tag.ToString().Trim();
                if (str_dwbh.Length > 4)
                {
                    str_dwbh = str_dwbh.Substring(0, 4);                     //单位编号
                }
                string str_bmbh = txt_tjdw.Tag.ToString().Trim();
                if (str_bmbh.Length == 4)
                {
                    str_bmbh = "";
                }
                string str_fzbh = cmb_fz.SelectedValue.ToString().Trim();//分组编号

                if (Convert.ToBoolean(dgr.Cells["selected"].Value))
                {
                    string str_xm   = dgr.Cells["xm"].Value.ToString().Trim();
                    string str_tjbh = "";
                    string str_tjcs = "";
                    //只检查姓名重复,暂不检查身份证重复的情况
                    string dwbh = txt_tjdw.Tag.ToString().Trim();
                    if (str_dwbh.Length > 4)
                    {
                        str_dwbh = str_dwbh.Substring(0, 4);                     //单位编号
                    }
                    DataTable dt_tjdjb = tjglbiz.Get_TJ_TJDJB_XM(str_xm, dwbh);
                    if (dt_tjdjb.Rows.Count > 0)
                    {
                        Form_tmqr frm = new Form_tmqr(dt_tjdjb);
                        if (frm.ShowDialog() == DialogResult.OK)
                        {
                            string str_retrun = frm.str_return;
                            if (str_retrun == "2")//同一人
                            {
                                str_tjbh = frm.str_tjbh;
                                str_tjcs = Convert.ToString(Convert.ToInt32(frm.str_tjcs) + 1);
                            }
                            if (str_retrun == "0")//取消
                            {
                                continue;
                            }
                        }
                    }
                    if (str_tjbh == "")
                    {
                        str_tjbh = xtbiz.GetHmz("tjbh", 1);
                        str_tjcs = "1";
                    }

                    string str_xb = dgr.Cells["xb"].Value.ToString().Trim();
                    str_xb = xtbiz.Get_Xtzd_Bzdm("1", str_xb);//性别
                    string str_csrq = dgr.Cells["csrq"].Value.ToString().Trim();
                    string str_nl   = dgr.Cells["nl"].Value.ToString().Trim();
                    try//处理出生日期和年龄的一致性
                    {
                        if (str_csrq == "")
                        {
                            str_csrq = xtbiz.GetServerDate().AddYears(-Convert.ToInt32(str_nl)).ToString();
                        }
                        if (str_nl == "")
                        {
                            str_nl = Convert.ToString(xtbiz.GetServerDate().Year - Convert.ToDateTime(str_csrq).Year);
                        }
                    }
                    catch
                    {
                    }

                    string str_hyzk = dgr.Cells["hyzk"].Value.ToString().Trim();
                    str_hyzk = xtbiz.Get_Xtzd_Bzdm("12", str_hyzk);//婚姻状况
                    string str_sykh = dgr.Cells["sykh"].Value == null ? "" : dgr.Cells["sykh"].Value.ToString().Trim();
                    string str_mz   = dgr.Cells["mz"].Value.ToString().Trim();
                    str_mz = xtbiz.Get_Xtzd_Bzdm("2", str_mz);//民族
                    string str_sfzh = dgr.Cells["sfzh"].Value.ToString().Trim();
                    string str_rylb = dgr.Cells["rylb"].Value.ToString().Trim();
                    str_rylb = xtbiz.Get_Xtzd_Bzdm("8", str_rylb);//人员类型
                    string str_phone   = dgr.Cells["phone"].Value.ToString().Trim();
                    string str_mobile  = dgr.Cells["mobile"].Value.ToString().Trim();
                    string str_address = dgr.Cells["lxdz"].Value.ToString().Trim();

                    string str_djrq  = xtbiz.GetServerDate().ToString();
                    string str_djlsh = "";
                    if (xtbiz.GetXtCsz("djlshgz") == "2")  //特殊规则YYMMDD+5位
                    {
                        str_djlsh = xtbiz.GetHmz("djlsh", 1);
                    }
                    else
                    {
                        str_djlsh = tjdjbiz.Get_proc_get_djlsh(str_tjrq, Program.userid);
                    }


                    string str_tjlb = cmb_ywlx.SelectedValue.ToString().Trim();
                    string gz       = dgr.Cells["gz"].Value == null ? "" : dgr.Cells["gz"].Value.ToString().Trim();
                    string gzbh     = xtbiz.Get_Xtzd_Bzdm("19", gz);

                    if (str_rylb == "")
                    {
                        MessageBox.Show("没找到对应的人员类别", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    //if (gz == "")
                    //{
                    //    MessageBox.Show("没找到对应的工种", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    //    return;
                    //}
                    tjdjBiz tjdjbiz1 = new tjdjBiz();
                    tjdjbiz1.str_Insert_TJ_TJDJB(str_tjbh, str_tjcs, str_tjrq, str_djrq, str_xm, str_xb, str_csrq, str_nl, str_hyzk, str_sykh, str_mz, str_sfzh, str_rylb,
                                                 str_phone, str_mobile, str_address, str_tjlb, str_djlsh, str_dwbh, str_bmbh, str_fzbh, "", "0", Program.userid, "2", "", gz, "", "", str_sfbz, "", "", "");

                    DataTable dt = null;
                    if (str_dwbh == "9999")//个体体检
                    {
                        dt = ywszbiz.Get_tj_tc_dt(str_fzbh);
                    }
                    else
                    {
                        dt = tjglbiz.Get_tj_dwfz_dt(str_fzbh);
                    }

                    int flag = 0;
                    foreach (DataRow dr in dt.Rows)
                    {
                        if (tjglbiz.CheckSex(dr["zhxm"].ToString().Trim(), str_xb) == 0)
                        {
                            MessageBox.Show("所选择的项目【编号:" + dr["zhxm"].ToString().Trim() + "】存在与性别不匹配,或者组合项目明细为空,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            return;
                        }
                        DataTable dt_tj_zhxm_hd = tjglbiz.Get_tj_zhxm_hd(dr["zhxm"].ToString().Trim());
                        string    str_xh        = xtbiz.GetHmz("tjjlbxh", 1);//体检记录本序号
                        string    str_lxbh      = dt_tj_zhxm_hd.Rows[0]["tjlx"].ToString().Trim();
                        string    str_tjxmbh    = dt_tj_zhxm_hd.Rows[0]["bh"].ToString().Trim();
                        string    str_xmdj      = dt_tj_zhxm_hd.Rows[0]["dj"].ToString().Trim();
                        string    str_zxks      = dt_tj_zhxm_hd.Rows[0]["tjlx"].ToString().Trim();
                        string    str_xmlx      = dt_tj_zhxm_hd.Rows[0]["jcjylx"].ToString().Trim();
                        string    str_sflb      = dt_tj_zhxm_hd.Rows[0]["sflb"].ToString().Trim();
                        tjdjbiz1.str_Insert_tj_tjjlb(str_xh, str_tjbh, str_tjcs, str_lxbh, str_tjrq, str_tjxmbh, str_xmdj, "0", "1", str_sflb, str_zxks, str_xmlx);

                        string str_zhxm = dr["zhxm"].ToString().Trim();
                        string str_tjmc = dr["mc"].ToString().Trim();

                        if (tjdjbiz1.IsNeedGfq(str_zhxm))
                        {
                            flag = 2;
                        }
                        if (flag == 0 && tjdjbiz1.NeedXhh(str_zhxm))
                        {
                            flag = 1;
                        }
                    }

                    if (flag == 2)
                    {
                        tjdjbiz1.saveXxh(str_tjbh, str_sfzh, true);
                    }
                    if (flag == 1)
                    {
                        tjdjbiz1.saveXxh(str_tjbh, str_sfzh, false);
                    }

                    tjdjbiz1.Exec_ArryList();//登记表执行成功后在执行记录表
                }
            }
            MessageBox.Show("批量导入成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            ckb_all.Checked = false;
            ckb_all_CheckedChanged(null, null);
        }
コード例 #20
0
 public Form_tjbg()
 {
     InitializeComponent();
     str_tjdw = xtbiz.GetXtCsz("TjDwMc");
     str_dwdh = xtbiz.GetXtCsz("TjDwDh");
 }
コード例 #21
0
        private void Form_report_Load(object sender, EventArgs e)
        {
            str_tjdw = xtbiz.GetXtCsz("TjDwMc");
            str_dwdh = xtbiz.GetXtCsz("TjDwDh");
            sqd_ts   = xtbiz.GetXtCsz("sqd_ts");

            BarcodeControl barcode = new BarcodeControl();

            barcode.BarcodeType = BarcodeType.CODE128A; //CODE128C
            barcode.Data        = str_tjbh;             //流水号改编号 by zhz
            barcode.CopyRight   = "";
            MemoryStream stream = new MemoryStream();

            barcode.MakeImage(ImageFormat.Png, 1, 50, true, false, null, stream);
            Bitmap myimge = new Bitmap(stream);

            string str_picpath  = Application.StartupPath + @"/Img/医院徽标.bmp";
            string str_barpath  = Application.StartupPath + @"/barcode.png";
            string str_ZYBG_Top = Application.StartupPath + @"/Img/ZYBG_Top.png";
            string str_yyewm    = Application.StartupPath + @"/Img/微信.png";

            myimge.Save(str_barpath, ImageFormat.Png);
            str_picpath  = "file:///" + str_picpath;
            str_barpath  = "file:///" + str_barpath;
            str_ZYBG_Top = "file:///" + str_ZYBG_Top;
            string strLog = "file:///" + Application.StartupPath + @"/Img/log.jpg";

            str_yyewm = "file:///" + str_yyewm;//微信二维码

            if (str_type == "tjzyd")
            {
                string str_dwlxr   = ""; //联系人
                string str_dwczhm  = ""; //传真
                string str_version = ""; //版本
                string str_dwdz    = ""; //地址
                str_dwczhm  = xtbiz.GetXtCsz("dwczdh").Trim();
                str_dwlxr   = xtbiz.GetXtCsz("dwlxr").Trim();
                str_dwdz    = xtbiz.GetXtCsz("dwdz").Trim();
                str_version = xtbiz.GetXtCsz("version").Trim();

                //DataTable dt1 = rdlcbiz.Get_tj_tjjlb(str_tjbh, str_tjcs);
                DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(str_tjbh, str_tjcs);
                DataTable dt3 = rdlcbiz.Get_v_tj_fyxx(str_tjbh, str_tjcs);
                DataTable dt1 = rdlcbiz.Get_tj_tjjlb_ks(str_tjbh, str_tjcs);

                if (xtbiz.GetXtCsz("version").Trim() == "1") //职业

                {
                    reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjzyd_zyb.rdlc";
                }
                else
                {
                    //reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjzyd.rdlc";
                    reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjzyd_zyb_0120.rdlc";//by zhz 0121
                }
                reportView.LocalReport.EnableExternalImages = true;
                ReportParameter rp1 = new ReportParameter("tjdw", str_tjdw);
                ReportParameter rp2 = new ReportParameter("barcode", str_barpath);
                ReportParameter rp3 = new ReportParameter("tjdh", str_dwdh);
                ReportParameter rp4 = new ReportParameter("log", strLog);
                ReportParameter rp5 = new ReportParameter("dwcz", str_dwczhm);
                ReportParameter rp6 = new ReportParameter("dwlxr", str_dwlxr);
                ReportParameter rp7 = new ReportParameter("version", str_version);
                ReportParameter rp8 = new ReportParameter("dwdz", str_dwdz);
                reportView.LocalReport.DataSources.Clear();
                reportView.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 });
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_tj_tjjlb", dt1));// by zhz
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_fyxx", dt3));
            }
            if (str_type == "tjsqd")
            {
                DataTable dt1 = rdlcbiz.Get_tj_sqdlx_hd(str_tjbh, str_tjcs);
                DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(str_tjbh, str_tjcs);
                reportView.LocalReport.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_tjsqd.rdlc";
                reportView.LocalReport.EnableExternalImages = true;
                ReportParameter rp1 = new ReportParameter("tjdw", str_tjdw);
                ReportParameter rp2 = new ReportParameter("barcode", str_barpath);
                ReportParameter rp3 = new ReportParameter("sqd_ts", sqd_ts);
                reportView.LocalReport.DataSources.Clear();
                reportView.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_tj_sqdlx_hd", dt1));
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));
            }
            if (str_type == "tjtxm")
            {
                DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(str_tjbh, str_tjcs);
                reportView.LocalReport.ReportPath           = Application.StartupPath + @"/rdlcreport/Report_tjtxm.rdlc";
                reportView.LocalReport.EnableExternalImages = true;
                ReportParameter rp1 = new ReportParameter("barcode", str_barpath);
                reportView.LocalReport.DataSources.Clear();
                reportView.LocalReport.SetParameters(new ReportParameter[] { rp1 });
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));
            }
            if (str_type == "tjbg")
            {
                DataTable dt2 = rdlcbiz.Get_v_tj_tjdjb(str_tjbh, str_tjcs);

                string str_tjlb = dt2.Rows[0]["lbbh"].ToString();
                if (str_tjlb == "05")//中医体检 2014-06-26
                {
                    DataTable  dt      = tjjgbiz.Get_v_tj_zyjgb(str_tjbh, str_tjcs);
                    byte[]     bytes   = PEIS.Properties.Resources.Report_tjbg_zytj;
                    FileStream fstream = File.Create(@"C:\WINDOWS\Temp\Report_tjbg_temp", bytes.Length);
                    try
                    {
                        fstream.Write(bytes, 0, bytes.Length);   //二进制转换成文件
                    }
                    catch (Exception ex)
                    {
                        //抛出异常信息
                        MessageBox.Show("报表文件处理异常,请联系技术支持人员!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    finally
                    {
                        fstream.Close();
                    }
                    File.Copy(@"C:\WINDOWS\Temp\Report_tjbg_temp", @"C:\WINDOWS\Temp\Report_tjbg_zytj", true);
                    reportView.LocalReport.ReportPath = @"C:\WINDOWS\Temp\Report_tjbg_zytj";
                    //reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg_zytj.rdlc";
                    reportView.LocalReport.EnableExternalImages = true;
                    reportView.LocalReport.DataSources.Clear();
                    ReportParameter rp     = new ReportParameter("dwmc", Program.reg_dwmc);
                    ReportParameter rp_top = new ReportParameter("ZYBG_Top", str_ZYBG_Top);
                    reportView.LocalReport.SetParameters(new ReportParameter[] { rp, rp_top });
                    reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_zyjgb", dt));
                    this.reportView.RefreshReport();
                    return;
                }

                reportView.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing);

                if (str_bggs == "明细结果格式")
                {
                    reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg_jgjcb.rdlc";
                }
                else if (str_bggs == "结论格式")
                {
                    reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg_zsbg.rdlc";
                }
                else//标准格式
                    //reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlcreport/Report_tjbg.rdlc";
                {
                    reportView.LocalReport.ReportPath = Application.StartupPath + @"/rdlc/Report_tjbg_zs_贺州.rdlc";
                }

                reportView.LocalReport.EnableExternalImages = true;
                ReportParameter rp1 = new ReportParameter("tjdw", str_tjdw);
                ReportParameter rp2 = new ReportParameter("barcode", str_barpath);
                ReportParameter rp3 = new ReportParameter("tjdh", str_dwdh);
                ReportParameter rp4 = new ReportParameter("yypic", str_picpath);
                ReportParameter rp5 = new ReportParameter("yyewm", str_yyewm);
                reportView.LocalReport.DataSources.Clear();
                //reportView.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3,rp4,rp5 });
                //reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_tj_tjjlb", dt1));
                reportView.LocalReport.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt2));
            }
            this.reportView.RefreshReport();
        }
コード例 #22
0
        void ScZsJy(DataTable dt_jbjlb)
        {
            rtb_zs.Text = "";
            rtb_jy.Text = "";

            DataTable dt_tjjlb = tjjgbiz.Get_TJ_TJJLB_XJ(str_tjbh, str_tjcs);

            if (dt_tjjlb.Rows.Count == 0)
            {
                if (str_sfqyzczsjy == "1")
                {
                    rtb_zs.Text = str_code + "  " + xtbiz.GetXtCsz("ZcZsStr");
                }
            }
            else
            {
                foreach (DataRow dr in dt_tjjlb.Rows)
                {
                    rtb_zs.AppendText(str_code + "  " + dr["mc"].ToString().Trim() + ":" + dr["xj"].ToString().Trim() + "\r");
                }
            }

            if (dt_jbjlb.Rows.Count == 0)
            {
                if (str_sfqyzczsjy == "1")
                {
                    if (dt_tjjlb.Rows.Count == 0)
                    {
                        rtb_jy.Text = str_code + "  " + xtbiz.GetXtCsz("ZcJystr");
                    }
                }
            }
            else
            {
                foreach (DataRow dr in dt_jbjlb.Rows)
                {
                    string    str_jbbh         = dr["jbbh"].ToString().Trim();
                    DataTable dt_tj_suggestion = tjjgbiz.Get_TJ_SUGGESTION_JYNR(str_jbbh);
                    if (dt_tj_suggestion.Rows.Count > 0)
                    {
                        if (dt_tj_suggestion.Rows[0]["jynr"].ToString().Trim() != "")
                        {
                            rtb_jy.AppendText(str_code + "  " + dt_tj_suggestion.Rows[0]["mc"].ToString().Trim() + "\r");
                            rtb_jy.AppendText(dt_tj_suggestion.Rows[0]["jynr"] + "\r");
                        }
                    }
                }
            }

            if (rtb_jy.Text.Trim() == "")
            {
                rtb_jy.Text = str_code + "  " + xtbiz.GetXtCsz("ZcJystr");
            }

            //rtb_zs.Text = "";
            //rtb_jy.Text = "";
            //if (dt_jbjlb.Rows.Count == 0)
            //{
            //    if (str_sfqyzczsjy == "1")
            //    {
            //        rtb_zs.Text = str_code + "  " + xtbiz.GetXtCsz("ZcZsStr");
            //        rtb_jy.Text = str_code + "  " + xtbiz.GetXtCsz("ZcJystr");
            //    }
            //}
            //else
            //{
            //    DataTable dt_tjjlb = tjjgbiz.Get_TJ_TJJLB_XJ(str_tjbh, str_tjcs);
            //    foreach (DataRow dr in dt_tjjlb.Rows)
            //    {
            //        rtb_zs.AppendText(str_code + "  " + dr["mc"].ToString().Trim() + ":" + dr["xj"].ToString().Trim() + "\r");
            //    }
            //    foreach (DataRow dr in dt_jbjlb.Rows)
            //    {
            //        string str_jbbh = dr["jbbh"].ToString().Trim();
            //        DataTable dt_tj_suggestion = tjjgbiz.Get_TJ_SUGGESTION_JYNR(str_jbbh);
            //        if (dt_tj_suggestion.Rows.Count > 0)
            //        {
            //            if (dt_tj_suggestion.Rows[0]["jynr"].ToString().Trim() != "")
            //            {
            //                rtb_jy.AppendText(str_code + "  " + dt_tj_suggestion.Rows[0]["mc"].ToString().Trim() + "\r");
            //                rtb_jy.AppendText(dt_tj_suggestion.Rows[0]["jynr"] + "\r");
            //            }
            //        }
            //    }
            //}
        }
コード例 #23
0
ファイル: Form_jysjlr.cs プロジェクト: wangronghua/PEIS_Autoz
        void LoadDjxx()
        {
            string djh = txtDjh.Text.Trim();

            djh         = comn.CharConverter(djh);
            djh         = ChangeNum(djh);
            txtDjh.Text = djh;
            dt          = new DataTable();
            dt          = jyjkBiz.GetDjxx(djh, comn.CharConverter(txtTjbh.Text.Trim()));
            if (dt.Rows.Count == 0)
            {
                MessageBox.Show("登记流水号【" + djh + "】无效!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = txtDjh;
                txtDjh.SelectAll();
                return;
            }
            string jyjx = cmbJyyq.SelectedValue.ToString().Trim();
            string djbh = dt.Rows[0]["djlsh"].ToString().Trim();

            cmbFb.SelectedIndex = 2;
            if (jyjkBiz.HasExist(jyjx, djbh))//如果已存在,将光标指向该项  PEIS.jyjk.Form_jysjlr
            {
                LoadDgvJydj(jyjx, "", djbh, cmbFb.SelectedIndex);
                int i = 0;
                for (; i < dgvJydj.Rows.Count; i++)
                {
                    string djlsh2 = dgvJydj.Rows[i].Cells["djlsh"].Value.ToString().Trim();
                    if (djlsh2 == djbh)
                    {
                        break;
                    }
                }
                if (dgvJydj.Rows.Count > 0)
                {
                    dgvJydj.CurrentCell = dgvJydj.Rows[i].Cells[3];
                }
            }
            else//不存在则插入记录
            {
                Jydj jydj = new Jydj();
                jydj.Djlsh = dt.Rows[0]["djlsh"].ToString().Trim();
                jydj.Djrq  = dtpDjrq.Value.ToString();
                jydj.Dwmc  = dt.Rows[0]["dwmc"].ToString().Trim();
                jydj.Jyjx  = jyjx;
                jydj.Nl    = dt.Rows[0]["nl"].ToString().Trim();
                jydj.Rylb  = dt.Rows[0]["rylb"].ToString().Trim();
                jydj.Sfzh  = dt.Rows[0]["sfzh"].ToString().Trim();
                jydj.Tjbh  = dt.Rows[0]["tjbh"].ToString().Trim();
                jydj.Xb    = dt.Rows[0]["xb"].ToString().Trim();
                jydj.Xm    = dt.Rows[0]["xm"].ToString().Trim();
                jydj.Gz    = dt.Rows[0]["gz"].ToString().Trim();
                string czyid = "";
                if (cmbJcys.SelectedIndex != -1)
                {
                    czyid = cmbJcys.SelectedValue.ToString();
                }
                jydj.Jcys = czyid;
                jydj.Shrq = xtBiz.GetDataNow().ToString();
                jydj.Shys = Program.userid;
                jydj.Tcmc = dt.Rows[0]["tcmc"].ToString().Trim().Split('(')[0];

                int count = jyjkBiz.Insert(jydj);
                if (count > 0)
                {
                    LoadDgvJydj(jyjx, dtpDjrq.Value.ToString("yyyy-MM-dd"), "", cmbFb.SelectedIndex);
                }
            }

            string zdtx = xtBiz.GetXtCsz("zdtx");

            if (zdtx == "1" && cmbJyyq.SelectedValue.ToString() == "0002")//目前只有BC5300具备通讯功能
            {
                btnTx_Click(null, null);
            }
        }
コード例 #24
0
        /// <summary>
        /// 批量导入按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bt_input_Click(object sender, EventArgs e)
        {
            if (!Check_DGV_Select())
            {
                MessageBox.Show("请选择需要导入的人员名单!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (txt_tjdw.Text.Trim() == "")
            {
                MessageBox.Show("请选择需要导入单位!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = bt_tjdw;
                return;
            }
            if (object.Equals(null, cmb_fz.SelectedValue))
            {
                MessageBox.Show("请选择分组!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = cmb_fz;
                return;
            }
            if (object.Equals(null, cmb_ywlx.SelectedValue))
            {
                MessageBox.Show("请选择体检业务类型!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = bt_tjdw;
                return;
            }
            string str_tjrq = dtp_tjrq.Value.ToString("yyyy-MM-dd");

            if (Convert.ToDateTime(str_tjrq) > Convert.ToDateTime(Program.sys_jzzcrq))
            {
                MessageBox.Show("系统使用非法,程序将自动关闭,请联系销售人员:!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Program.sfzc = false;
                main.Form_reg frm_reg = new PEIS.main.Form_reg();
                frm_reg.ShowDialog();
            }

            StringBuilder gzmcs = new StringBuilder();

            foreach (DataGridViewRow dgr in dgv_excel.Rows)
            {
                string str_dwbh = txt_tjdw.Tag.ToString().Trim();
                if (str_dwbh.Length > 4)
                {
                    str_dwbh = str_dwbh.Substring(0, 4);                     //单位编号
                }
                //string str_bmbh = txt_tjdw.Tag.ToString().Trim();
                //if (str_bmbh.Length == 4) str_bmbh = "";
                string str_fzbh = cmb_fz.SelectedValue.ToString().Trim();//分组编号

                if (Convert.ToBoolean(dgr.Cells["selected"].Value))
                {
                    string str_xm   = dgr.Cells["xm"].Value.ToString().Trim();
                    string str_tjbh = "";
                    string str_tjcs = "";
                    //只检查姓名重复,暂不检查身份证重复的情况
                    DataTable dt_tjdjb = tjglbiz.Get_TJ_TJDJB_XM(str_xm, str_dwbh);
                    if (dt_tjdjb.Rows.Count > 0)
                    {
                        Form_tmqr frm = new Form_tmqr(dt_tjdjb);
                        if (frm.ShowDialog() == DialogResult.OK)
                        {
                            string str_retrun = frm.str_return;
                            if (str_retrun == "2")//同一人
                            {
                                str_tjbh = frm.str_tjbh;
                                str_tjcs = Convert.ToString(Convert.ToInt32(frm.str_tjcs) + 1);
                            }
                            if (str_retrun == "0")//取消
                            {
                                continue;
                            }
                        }
                    }
                    if (str_tjbh == "")
                    {
                        str_tjbh = xtbiz.GetHmz("tjbh", 1);
                        str_tjcs = "1";
                    }

                    string str_xb = dgr.Cells["xb"].Value.ToString().Trim();
                    str_xb = xtbiz.Get_Xtzd_Bzdm("1", str_xb);                   //性别
                    string str_csrq = dgr.Cells["csrq"].Value.ToString().Trim(); //出生
                    //string str_nl = dgr.Cells["nl"].Value.ToString().Trim();//年龄
                    if (!str_csrq.Contains("-"))
                    {
                        string s1 = str_csrq.Substring(0, 4);
                        string s2 = str_csrq.Substring(4, 2);
                        string s3 = str_csrq.Substring(6, 2);
                        str_csrq = s1 + "-" + s2 + "-" + s3;
                    }
                    //处理出生日期和年龄的一致性 by zhz
                    //if (str_csrq == "") str_csrq = xtbiz.GetServerDate().AddYears(-Convert.ToInt32(str_nl)).ToString();
                    string str_nl = Convert.ToString(xtbiz.GetServerDate().Year - Convert.ToDateTime(str_csrq).Year);

                    //string str_hyzk = dgr.Cells["hyzk"].Value.ToString().Trim();
                    //str_hyzk = xtbiz.Get_Xtzd_Bzdm("12", str_hyzk);//婚姻状况
                    //string str_sykh = dgr.Cells["sykh"].Value.ToString().Trim();//索引
                    //string str_mz = dgr.Cells["mz"].Value.ToString().Trim();
                    //str_mz = xtbiz.Get_Xtzd_Bzdm("2", str_mz);//民族
                    string str_sfzh = dgr.Cells["sfzh"].Value.ToString().Trim();//身份证
                    //string str_rylb = dgr.Cells["rylb"].Value.ToString().Trim();
                    //str_rylb = xtbiz.Get_Xtzd_Bzdm("8", str_rylb);//人员类型
                    //string str_phone = dgr.Cells["phone"].Value.ToString().Trim();
                    string str_mobile = dgr.Cells["mobile"].Value.ToString().Trim();
                    //string str_address = dgr.Cells["lxdz"].Value.ToString().Trim();
                    //string whcd = dgr.Cells["whcd"].Value.ToString().Trim();
                    string gzmc = dgr.Cells["gz"].Value.ToString().Trim();
                    string gz   = xtbiz.Get_Xtzd_Bzdm("19", gzmc);               //获取工种
                    //whcd = xtbiz.Get_Xtzd_Bzdm("18", whcd);//获取文化程度
                    string str_whys = dgr.Cells["whys"].Value.ToString().Trim(); //危害因素
                    str_whys = xtbiz.Get_Xtzd_Bzdm("20", str_whys);              //危害因素
                    //str_rylb = xtbiz.Get_Xtzd_Bzdm("8", str_rylb);//人员类型
                    //string sszl = dgr.Cells["sszl"].Value.ToString().Trim();//所属证类
                    //string bzhy = dgr.Cells["bzhy"].Value.ToString().Trim();//办证行业
                    //string gl = dgr.Cells["zgl"].Value.ToString().Trim();//总工龄
                    string jhgl = dgr.Cells["jhgl"].Value.ToString().Trim(); //接害工龄
                    //string str_gh = dgr.Cells["gh"].Value.ToString().Trim();//工号
                    string dw = dgr.Cells["dw"].Value.ToString().Trim();     //单位
                    //string str_bmbh = dgr.Cells["bm"].Value.ToString().Trim();//部门
                    string str_bmbh = txt_tjdw.Tag.ToString().Trim();
                    if (str_bmbh.Length == 4)
                    {
                        str_bmbh = "";                      //不确定部门是多少
                    }
                    #region 危害因素必须录入参数控制
                    if (xtbiz.GetXtCsz("pldjwhyslbpd") == "1") //批量登记危害因素是否判断
                    {
                        if (str_whys == "")
                        {
                            MessageBox.Show("没找到对应的危害因素", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            return;
                        }
                    }
                    #endregion

                    #region 人员类别必须录入参数控制
                    //if (xtbiz.GetXtCsz("pldjrylbpd") == "1") //批量登记人员类别是否判断
                    //{
                    //    if (str_rylb == "")
                    //    {
                    //        MessageBox.Show("没找到对应的人员类别", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    //        return;
                    //    }
                    //}
                    #endregion

                    #region 工种必须录入参数控制
                    if (xtbiz.GetXtCsz("pldjgzpd") == "1") //批量登记工种是否判断
                    {
                        if (gz == "")
                        {
                            MessageBox.Show("没找到对应的工种:" + gzmcs.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            return;
                        }
                    }
                    #endregion
                    string str_djlsh = "";
                    string str_djrq  = xtbiz.GetServerDate().ToString();

                    if (xtbiz.GetXtCsz("djlshgz") == "2")  //特殊规则YYMMDD+5位
                    {
                        str_djlsh = xtbiz.GetHmz("djlsh", 1);
                    }
                    else
                    {
                        str_djlsh = tjdjbiz.Get_proc_get_djlsh(str_tjrq, Program.userid);
                    }

                    string str_ywlx = cmb_ywlx.SelectedValue.ToString().Trim();

                    //string sfbz = dgr.Cells["sfbz"].Value.ToString().Trim();
                    //if (sfbz == "是")
                    //{
                    //    str_sfbz = "1";
                    //}
                    //else
                    //{
                    //    str_sfbz = "0";
                    //}

                    tjdjBiz tjdjbiz1 = new tjdjBiz();
                    //tjdjbiz1.str_Insert_TJ_TJDJB(str_tjbh, str_tjcs, str_tjrq, str_djrq, str_xm, str_xb, str_csrq, str_nl, str_hyzk, str_sykh, str_mz, str_sfzh, str_rylb,
                    //    "", str_mobile, str_address, str_ywlx, str_djlsh, str_dwbh, str_bmbh, str_fzbh, "", "0", Program.userid, "2",whcd,gz,str_whys,gl,str_sfbz,sszl,bzhy,jhgl);
                    tjdjbiz1.str_Insert_TJ_TJDJB(str_tjbh, str_tjcs, str_tjrq, str_djrq, str_xm, str_xb, str_csrq, str_nl, "", "", "", str_sfzh, "",
                                                 "", str_mobile, "", str_ywlx, str_djlsh, str_dwbh, str_bmbh, str_fzbh, "", "0", Program.userid, "2", "", gz, str_whys, "", str_sfbz, "", "", jhgl);
                    DataTable dt = null;
                    if (str_dwbh == "9999")//个体体检
                    {
                        dt = ywszbiz.Get_tj_tc_dt(str_fzbh);
                    }
                    else
                    {
                        dt = tjglbiz.Get_tj_dwfz_dt(str_fzbh);
                    }

                    int flag = 0;//如果不需要x线号  值为0,普通x线号值为1,高仟伏x线号值为2

                    foreach (DataRow dr in dt.Rows)
                    {
                        if (tjglbiz.CheckSex(dr["zhxm"].ToString().Trim(), str_xb) == 0)
                        {
                            MessageBox.Show("所选择的项目【编号:" + dr["zhxm"].ToString().Trim() + "】存在与性别不匹配,或者组合项目明细为空,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            return;
                        }
                        DataTable dt_tj_zhxm_hd = tjglbiz.Get_tj_zhxm_hd(dr["zhxm"].ToString().Trim());
                        string    str_xh        = xtbiz.GetHmz("tjjlbxh", 1);//体检记录本序号
                        string    str_lxbh      = dt_tj_zhxm_hd.Rows[0]["tjlx"].ToString().Trim();
                        string    str_tjxmbh    = dt_tj_zhxm_hd.Rows[0]["bh"].ToString().Trim();
                        string    str_xmdj      = dt_tj_zhxm_hd.Rows[0]["dj"].ToString().Trim();
                        string    str_zxks      = dt_tj_zhxm_hd.Rows[0]["tjlx"].ToString().Trim();
                        string    str_xmlx      = dt_tj_zhxm_hd.Rows[0]["jcjylx"].ToString().Trim();
                        string    str_sflb      = dt_tj_zhxm_hd.Rows[0]["sflb"].ToString().Trim();

                        tjdjbiz1.str_Insert_tj_tjjlb(str_xh, str_tjbh, str_tjcs, str_lxbh, str_tjrq, str_tjxmbh, str_xmdj, "0", "1", str_sflb, str_zxks, str_xmlx);

                        //生成x线号*****************************************************

                        //获取套餐里是否有x光相关的东西

                        /////////*******************************************************88888
                        string str_zhxm = dr["zhxm"].ToString().Trim();
                        string str_tjmc = dr["mc"].ToString().Trim();

                        if (tjdjbiz1.IsNeedGfq(str_zhxm))
                        {
                            flag = 2;
                        }
                        if (flag == 0 && tjdjbiz1.NeedXhh(str_zhxm))
                        {
                            flag = 1;
                        }
                    }
                    if (flag == 2)
                    {
                        tjdjbiz1.saveXxh(str_tjbh, str_sfzh, true);
                    }
                    if (flag == 1)
                    {
                        tjdjbiz1.saveXxh(str_tjbh, str_sfzh, false);
                    }

                    if (str_ywlx.Trim() == "01")
                    {
                        //tjdjbiz1.str_Insert_TJ_ZYB_RYXX(str_tjbh, str_tjcs, str_xm, str_xb, str_sfzh, str_csrq, txt_tjdw.Text.Trim(), str_mobile, str_gh, "", dtp_tjrq.Value.ToString("yyyy-MM-dd"), str_rylb,
                        //"", "", dtp_tjrq.Value.ToString("yyyy-MM-dd"), "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", str_address, gz, "", "", "", str_mz, str_hyzk, gl, jhgl, str_whys, "");
                        tjdjbiz1.str_Insert_TJ_ZYB_RYXX(str_tjbh, str_tjcs, str_xm, str_xb, str_sfzh, str_csrq, txt_tjdw.Text.Trim(), str_mobile, "", "", dtp_tjrq.Value.ToString("yyyy-MM-dd"), "",
                                                        "", "", dtp_tjrq.Value.ToString("yyyy-MM-dd"), "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", gz, "", "", "", "", "", "", jhgl, str_whys, "");
                    }
                    tjdjbiz1.Exec_ArryList();//登记表执行成功后在执行记录表
                }
            }
            MessageBox.Show("批量导入成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            ckb_all.Checked = false;
            ckb_all_CheckedChanged(null, null);
        }