Exemple #1
0
        public void init()
        {
            DBConn    db  = new DBConn();
            string    sql = "select * from gxjzdj where aac044 = '" + s.aac044 + "' and id=" + str_id;
            DataTable dt  = db.GetDataSet(sql).Tables[0];

            gx = new gxjzdj();
            var pros = gx.GetType().GetProperties();

            foreach (var p in pros)
            {
                p.SetValue(gx, dt.Rows[0][p.Name].ToString(), null);
            }
        }
Exemple #2
0
        //更新就诊登记初始化
        public void gxinit()
        {
            DBConn    db  = new DBConn();
            string    sql = "select * from gxjzdj where aac044 = '" + s.aac044 + "' and id = " + str_id;
            DataTable dt  = db.GetDataSet(sql).Tables[0];

            init();
            if (dt.Rows.Count == 0)
            {
                button5.Visible = false;
                button6.Visible = false;

                label37.Visible    = false;
                label38.Visible    = false;
                txttransid.Visible = false;
                txtykc700.Visible  = false;
                button1.Text       = "提交就诊登记";
                return;
            }
            button5.Visible = true;
            button6.Visible = true;

            label37.Visible    = true;
            label38.Visible    = true;
            txttransid.Visible = true;
            txtykc700.Visible  = true;

            button1.Text = "更新就诊登记";

            gj = new gxjzdj();
            var pros = gj.GetType().GetProperties();

            foreach (var p in pros)
            {
                p.SetValue(gj, dt.Rows[0][p.Name].ToString(), null);
            }

            panel1 = (Panel)qj.kjdq(this.panel1, gj);
        }
Exemple #3
0
        /// <summary>
        /// 通用按钮点击选项卡 在选项卡上显示对应的窗体
        /// </summary>
        private void btnX_Click(object sender, EventArgs e)
        {
            string formClass = ((TabControl)sender).SelectedTab.Tag.ToString();

            //string form = tabControl1.SelectedTab.Tag.ToString();

            Form      fm  = null;
            DBConn    db  = null;
            DataTable dt  = null;
            string    sql = "";

            switch (formClass)
            {
            case "Form5":     //身份验证信息
                fm = new Form5(aac044, frm, str_id);
                break;

            case "Form6":    //就诊登记
                fm = new Form6(sf, str_id);
                break;

            case "Form10":    //费用明细录入
                db  = new DBConn();
                sql = "select * from gxjzdj where aac044 = '" + sf.aac044 + "'and id =" + str_id;
                dt  = db.GetDataSet(sql).Tables[0];

                if (dt.Rows.Count > 0)
                {
                    gxjzdj gx   = new gxjzdj();
                    var    pros = gx.GetType().GetProperties();
                    foreach (var p in pros)
                    {
                        p.SetValue(gx, dt.Rows[0][p.Name].ToString(), null);
                    }
                    fm = new Form10(gx, str_id);
                }
                break;

            case "Form7":    //出院登记
                DBConn con = new DBConn();
                sql = "select * from fymxjl where aac044 = '" + sf.aac044 + "' and id = " + str_id;
                dt  = con.GetDataSet(sql).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    sql = "select * from fhjzdj where aac044 = '" + sf.aac044 + "' and id = " + str_id;
                    dt  = con.GetDataSet(sql).Tables[0];
                    string ykc700 = dt.Rows[0]["ykc700"].ToString();
                    fm = new Form7(sf, ykc700, str_id);
                }
                break;

            case "Form12":    //模拟结算
                db  = new DBConn();
                sql = "select * from cydj where aac044 = '" + sf.aac044 + "' and id = " + str_id;
                dt  = db.GetDataSet(sql).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    fm = new Form12(this.sf, str_id);
                }
                break;

            case "Form14":     //费用结算
                db  = new DBConn();
                sql = "select * from cydj where aac044 = '" + sf.aac044 + "' and id = " + str_id;
                dt  = db.GetDataSet(sql).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    fm = new Form14(sf, str_id);;;
                }
                break;

            case "Form15":
                db  = new DBConn();
                sql = "select * from gxjzdj where aac044 = '" + sf.aac044 + "' and id = " + str_id;
                dt  = db.GetDataSet(sql).Tables[0];

                if (dt.Rows.Count > 0)
                {
                    gxjzdj gx   = new gxjzdj();
                    var    pros = gx.GetType().GetProperties();
                    foreach (var p in pros)
                    {
                        p.SetValue(gx, dt.Rows[0][p.Name].ToString(), null);
                    }
                    fm = new Form15(gx, str_id);
                }
                break;

            default:

                break;
            }
            if (fm == null)
            {
                int zt = int.Parse(qj.getGxStatus(aac044, str_id));
                foreach (var q in qj.status)
                {
                    if (int.Parse(q.Key) == zt + 1)
                    {
                        ((TabControl)sender).SelectedTab.Controls.Clear();
                        MessageBox.Show("请先完成:" + q.Value);
                        return;
                    }
                }
            }
            ((TabControl)sender).SelectedTab.Controls.Clear();
            fm.FormBorderStyle = FormBorderStyle.None;
            fm.TopLevel        = false;
            fm.Parent          = ((TabControl)sender).SelectedTab;
            fm.ControlBox      = false;
            fm.Dock            = DockStyle.Fill;
            fm.Anchor          = AnchorStyles.None;
            fm.Show();

            //s[((TabControl)sender).SelectedIndex] = 1;
        }
Exemple #4
0
        private void button5_Click(object sender, EventArgs e)
        {
            DBConn    db  = new DBConn();
            string    sql = "select * from gxjzdj where aac044 = '" + s.aac044 + "' and id = " + str_id;
            DataTable dt  = db.GetDataSet(sql).Tables[0];

            if (dt.Rows.Count < 1)
            {
                MessageBox.Show("该病人尚未就诊登记"); return;
            }
            gxjzdj gx   = new gxjzdj();
            var    pros = gx.GetType().GetProperties();

            foreach (var p in pros)
            {
                p.SetValue(gx, dt.Rows[0][p.Name].ToString(), null);
            }

            DialogResult dr = MessageBox.Show("确认对该病人进行就诊登记回退吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

            if (dr == DialogResult.OK)
            {
                string otran            = "select transid from fhjzdj where aac044 = '" + s.aac044 + "' and id=" + str_id;
                string otranid          = db.GetDataSet(otran).Tables[0].Rows[0]["transid"].ToString();
                WebReference.STYDJY bbb = new WebReference.STYDJY();
                string resultxml        = bbb.STYDJKService("0214", "<?xml version=\"1.0\" encoding=\"GBK\"?>"
                                                            + "<input>"
                                                            + "<otransid>" + otranid + "</otransid>"
                                                            + "<aab299>" + PublicCommon.aab299 + "</aab299>"
                                                            + "<yab600>" + PublicCommon.yab600 + "</yab600>"
                                                            + "<akb026>" + PublicCommon.akb026 + "</akb026>"
                                                            + "<akb021>" + PublicCommon.akb021 + "</akb021>"
                                                            + "<ykc700>" + gx.ykc700 + "</ykc700>"
                                                            + "<aab301>" + gx.aab301 + "</aab301>"
                                                            + "<yab060>" + gx.yab060 + "</yab060>"
                                                            + "<aac002>" + gx.aac002 + "</aac002>"
                                                            + "<aac043>" + gx.aac043 + "</aac043>"
                                                            + "<aac044>" + gx.aac044 + "</aac044>"
                                                            + "<aae011>" + gx.aae011 + "</aae011>"
                                                            + "<aae036>" + gx.aae036 + "</aae036>"
                                                            + "</input>");

                if (resultxml == "")
                {
                    return;
                }
                XmlDocument xd = new XmlDocument();
                xd.LoadXml(resultxml);
                XmlNode res   = xd.SelectSingleNode("//result");
                int     error = int.Parse(res.SelectSingleNode("errorcode").InnerText);
                if (error < 0)
                {
                    MessageBox.Show(res.SelectSingleNode("errormsg").InnerText);
                }
                else
                {
                    MessageBox.Show("身份证为:" + gx.aac044 + " 的病人出院登记回退成功");
                    string sql1 = "delete fhjzdj where aac044 = '" + gx.aac044 + "' and id = " + str_id;
                    string sql2 = "delete gxjzdj where aac044 = '" + gx.aac044 + "' and id = " + str_id;
                    db.GetSqlCmd(sql1);
                    db.GetSqlCmd(sql2);
                    frm3.sfsbcx();
                }
            }
        }