예제 #1
0
        public void init()
        {
            DBConn conn = new DBConn();


            foreach (var c in qj.ykc679)
            {
                comykc679.Items.Add(c.Value);
            }

            foreach (var c in qj.ykc680)
            {
                comykc680.Items.Add(c.Value);
            }

            comykc679.SelectedIndex = 0;
            comykc680.SelectedIndex = 0;

            var bm = new AutoCompleteStringCollection();

            bm.AddRange(qj.icd.Keys.ToArray <string>());
            txtakc193.AutoCompleteCustomSource = bm;
            txtakc193.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            txtakc193.AutoCompleteSource       = AutoCompleteSource.CustomSource;

            txtykc601.AutoCompleteCustomSource = bm;
            txtykc601.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            txtykc601.AutoCompleteSource       = AutoCompleteSource.CustomSource;

            txtykc602.AutoCompleteCustomSource = bm;
            txtykc602.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            txtykc602.AutoCompleteSource       = AutoCompleteSource.CustomSource;

            var jb = new AutoCompleteStringCollection();

            jb.AddRange(qj.icd.Values.ToArray <string>());
            txtakc050.AutoCompleteCustomSource = jb;
            txtakc050.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            txtakc050.AutoCompleteSource       = AutoCompleteSource.CustomSource;


            var ks = new AutoCompleteStringCollection();

            ks.AddRange(qj.akf001.Values.ToArray <string>());
            txtakf001.AutoCompleteCustomSource = ks;
            txtakf001.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            txtakf001.AutoCompleteSource       = AutoCompleteSource.CustomSource;



            txtaac002.Text = s.aac002;
            txtaac044.Text = s.aac044;
            foreach (var z in qj.aac043)
            {
                if (s.aac043 == z.Key)
                {
                    comaac043.SelectedItem = z.Value;
                }
            }

            foreach (var y in qj.aka130)
            {
                if (s.aka130 == y.Key)
                {
                    comaka130.SelectedItem = y.Value;
                }
            }
        }
예제 #2
0
        //就诊登记
        public void djjzdj()
        {
            string ryks  = "";
            var    lryks = (from r in qj.akf001 where r.Value == txtakf001.Text.Trim() select r.Key).ToList <string>();

            if (lryks.Count > 0)
            {
                ryks = lryks[0];
            }

            string ryyy = (from r in qj.ykc679 where r.Value == comykc679.SelectedItem.ToString() select r.Key).ToList <string>()[0];
            string bzlx = (from r in qj.ykc680 where r.Value == comykc680.SelectedItem.ToString() select r.Key).ToList <string>()[0];

            string resultxml = qj.cscf("0212", "<?xml version=\"1.0\" encoding=\"GBK\"?>"
                                       + "<input>"
                                       + "<aab299>" + PublicCommon.aab299 + "</aab299>"
                                       + "<yab600>" + PublicCommon.yab600 + "</yab600>"
                                       + "<akb026>" + PublicCommon.akb026 + "</akb026>"
                                       + "<akb021>" + PublicCommon.akb021 + "</akb021>"
                                       + "<aab301>" + s.aab301 + "</aab301>"
                                       + "<yab060>" + s.yab060 + "</yab060>"
                                       + "<aac002>" + s.aac002 + "</aac002>"
                                       + "<aac043>" + s.aac043 + "</aac043>"
                                       + "<aac044>" + s.aac044 + "</aac044>"
                                       + "<aka130>" + s.aka130 + "</aka130>"
                                       + "<ykc009>" + txtykc009.Text.Trim() + "</ykc009>"
                                       + "<akc190>" + txtakc190.Text.Trim() + "</akc190>"
                                       + "<akf001>" + ryks + "</akf001>"
                                       + "<yzz018>" + txtyzz018.Text.Trim() + "</yzz018>"
                                       + "<yzz019>" + txtyzz019.Text.Trim() + "</yzz019>"
                                       + "<ykc012>" + txtykc012.Text.Trim() + "</ykc012>"
                                       + "<akc050>" + txtakc050.Text.Trim() + "</akc050>"
                                       + "<ykc679>" + ryyy + "</ykc679>"
                                       + "<ykc680>" + bzlx + "</ykc680>"
                                       + "<akc193>" + txtakc193.Text.Trim() + "</akc193>"
                                       + "<ykc601>" + txtykc601.Text.Trim() + "</ykc601>"
                                       + "<ykc602>" + txtykc602.Text.Trim() + "</ykc602>"
                                       + "<akc056>" + txtakc056.Text.Trim() + "</akc056>"
                                       + "<ake022>" + txtake022.Text.Trim() + "</ake022>"
                                       + "<ykc701>" + dtpykc701.Text.Trim() + "</ykc701>"
                                       + "<aae011>" + txtaae011.Text.Trim() + "</aae011>"
                                       + "<aae036>" + txtaae036.Text.Trim() + "</aae036>"
                                       + "<aae004>" + txtaae004.Text.Trim() + "</aae004>"
                                       + "<aae005>" + txtaae005.Text.Trim() + "</aae005>"
                                       + "<aae013>" + txtaae013.Text.Trim() + "</aae013>"
                                       + "</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
            {
                string ykc700  = res.SelectSingleNode("output").SelectSingleNode("ykc700").InnerText;
                string transid = res.SelectSingleNode("transid").InnerText;
                //FileStream fs = new FileStream("D://ak.txt", FileMode.Create);
                //StreamWriter sw = new StreamWriter(fs);
                ////开始写入
                //sw.Write(ykc700);
                ////清空缓冲区
                //sw.Flush();
                ////关闭流
                //sw.Close();
                //fs.Close();

                string gxsql = "INSERT INTO [ydjs_zyy].[dbo].[gxjzdj]([sign],[transid],[aab299],[yab600],[akb026],[akb021],[aab301],[ykc700],[yab060],[aac002]," +
                               "[aac043],[aac044],[aka130],[ykc009],[akc190],[akf001],[yzz018],[yzz019],[ykc012],[akc050],[ykc679],[ykc680]," +
                               "[akc193],[ykc601],[ykc602],[akc056],[ake022],[ykc701],[aae011],[aae036],[aae004],[aae005],[aae013],[id])" +
                               "VALUES('" + s.sign + "','" + transid + "','" + PublicCommon.aab299 + "','" + PublicCommon.yab600 + "','" + PublicCommon.akb026 + "','" + PublicCommon.akb021 + "','" + s.aab301 + "','" + ykc700 + "'," +
                               "'" + s.yab060 + "','" + s.aac002 + "','" + s.aac043 + "','" + s.aac044 + "','" + s.aka130 + "','" + txtykc009.Text.Trim() + "'," +
                               "'" + txtakc190.Text.Trim() + "','" + ryks + "','" + txtyzz018.Text.Trim() + "','" + txtyzz019.Text.Trim() + "'," +
                               "'" + txtykc012.Text.Trim() + "','" + txtakc050.Text.Trim() + "','" + ryyy + "','" + bzlx + "'," +
                               "'" + txtakc193.Text.Trim() + "','" + txtykc601.Text.Trim() + "','" + txtykc602.Text.Trim() + "','" + txtakc056.Text.Trim() + "'," +
                               "'" + txtake022.Text.Trim() + "','" + dtpykc701.Text.Trim() + "','" + txtaae011.Text.Trim() + "','" + txtaae036.Text.Trim() + "'," +
                               "'" + txtaae004.Text.Trim() + "','" + txtaae005.Text.Trim() + "','" + txtaae013.Text.Trim() + "'," + str_id + ")";
                DBConn db     = new DBConn();
                int    re     = db.GetSqlCmd(gxsql);
                string result = "";
                if (re > 0)
                {
                    result += "就诊登记已经记录";
                }

                fhjzdj  fj   = new fhjzdj();
                var     pors = fj.GetType().GetProperties();
                XmlNode op   = res.SelectSingleNode("output");
                for (int i = 0; i < pors.Length; i++)
                {
                    if (pors[i].Name == "sign" || pors[i].Name == "transid" || pors[i].Name == "errorcode" || pors[i].Name == "errormsg")
                    {
                        pors[i].SetValue(fj, res.SelectSingleNode(pors[i].Name).InnerText, null);
                    }
                    else
                    {
                        pors[i].SetValue(fj, op.SelectSingleNode(pors[i].Name).InnerText, null);
                    }
                }
                string sql = qj.getSql(fj, fj.GetType().Name, str_id, null);
                int    f   = db.GetSqlCmd(sql);
                if (f > 0)
                {
                    result = "操作成功!";
                    qj.gxStatus(1, s.aac044, str_id);
                }
                MessageBox.Show(result);
                gxinit();
            }
        }
예제 #3
0
        //更新就诊登记
        public void gxjzdj()
        {
            string ryks  = "";
            var    lryks = (from r in qj.akf001 where r.Value == txtakf001.Text.Trim() select r.Key).ToList <string>();

            if (lryks.Count > 0)
            {
                ryks = lryks[0];
            }

            string ryyy = (from r in qj.ykc679 where r.Value == comykc679.SelectedItem.ToString() select r.Key).ToList <string>()[0];
            string bzlx = (from r in qj.ykc680 where r.Value == comykc680.SelectedItem.ToString() select r.Key).ToList <string>()[0];

            string resultxml = qj.cscf("0213", "<?xml version=\"1.0\" encoding=\"GBK\"?>"
                                       + "<input>"
                                       + "<aab299>" + PublicCommon.aab299 + "</aab299>"
                                       + "<yab600>" + PublicCommon.yab600 + "</yab600>"
                                       + "<akb026>" + PublicCommon.akb026 + "</akb026>"
                                       + "<akb021>" + PublicCommon.akb021 + "</akb021>"
                                       + "<aab301>" + s.aab301 + "</aab301>"
                                       + "<ykc700>" + txtykc700.Text.Trim() + "</ykc700>"
                                       + "<yab060>" + s.yab060 + "</yab060>"
                                       + "<aac002>" + s.aac002 + "</aac002>"
                                       + "<aac043>" + s.aac043 + "</aac043>"
                                       + "<aac044>" + s.aac044 + "</aac044>"
                                       + "<aka130>" + s.aka130 + "</aka130>"
                                       + "<akc190>" + txtakc190.Text.Trim() + "</akc190>"
                                       + "<akf001>" + ryks + "</akf001>"
                                       + "<yzz018>" + txtyzz018.Text.Trim() + "</yzz018>"
                                       + "<yzz019>" + txtyzz019.Text.Trim() + "</yzz019>"
                                       + "<ykc012>" + txtykc012.Text.Trim() + "</ykc012>"
                                       + "<akc050>" + txtakc050.Text.Trim() + "</akc050>"
                                       + "<ykc679>" + ryyy + "</ykc679>"
                                       + "<ykc680>" + bzlx + "</ykc680>"
                                       + "<akc193>" + txtakc193.Text.Trim() + "</akc193>"
                                       + "<ykc601>" + txtykc601.Text.Trim() + "</ykc601>"
                                       + "<ykc602>" + txtykc602.Text.Trim() + "</ykc602>"
                                       + "<akc056>" + txtakc056.Text.Trim() + "</akc056>"
                                       + "<ake022>" + txtake022.Text.Trim() + "</ake022>"
                                       + "<ykc701>" + dtpykc701.Text.Trim() + "</ykc701>"
                                       + "<aae011>" + txtaae011.Text.Trim() + "</aae011>"
                                       + "<aae036>" + txtaae036.Text.Trim() + "</aae036>"
                                       + "<aae004>" + txtaae004.Text.Trim() + "</aae004>"
                                       + "<aae005>" + txtaae005.Text.Trim() + "</aae005>"
                                       + "<aae013>" + txtaae013.Text.Trim() + "</aae013>"
                                       + "</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
            {
                string transid = res.SelectSingleNode("transid").InnerText;
                DBConn db      = new DBConn();
                string gxsql   = "INSERT INTO [ydjs_zyy].[dbo].[gxjzdj]([sign],[transid],[aab299],[yab600],[akb026],[akb021],[aab301],[ykc700],[yab060],[aac002]," +
                                 "[aac043],[aac044],[aka130],[ykc009],[akc190],[akf001],[yzz018],[yzz019],[ykc012],[akc050],[ykc679],[ykc680]," +
                                 "[akc193],[ykc601],[ykc602],[akc056],[ake022],[ykc701],[aae011],[aae036],[aae004],[aae005],[aae013],[id])" +
                                 "VALUES('" + s.sign + "','" + transid + "','440800','440825','4400001159975','湛江市赤坎区中医医院','" + s.aab301 + "','" + txtykc700.Text.Trim() + "'," +
                                 "'" + s.yab060 + "','" + s.aac002 + "','" + s.aac043 + "','" + s.aac044 + "','" + s.aka130 + "','" + txtykc009.Text.Trim() + "'," +
                                 "'" + txtakc190.Text.Trim() + "','" + ryks + "','" + txtyzz018.Text.Trim() + "','" + txtyzz019.Text.Trim() + "'," +
                                 "'" + txtykc012.Text.Trim() + "','" + txtakc050.Text.Trim() + "','" + ryyy + "','" + bzlx + "'," +
                                 "'" + txtakc193.Text.Trim() + "','" + txtykc601.Text.Trim() + "','" + txtykc602.Text.Trim() + "','" + txtakc056.Text.Trim() + "'," +
                                 "'" + txtake022.Text.Trim() + "','" + dtpykc701.Text.Trim() + "','" + txtaae011.Text.Trim() + "','" + txtaae036.Text.Trim() + "'," +
                                 "'" + txtaae004.Text.Trim() + "','" + txtaae005.Text.Trim() + "','" + txtaae013.Text.Trim() + "'," + str_id + ")";
                string sql = "DELETE FROM [gxjzdj] WHERE aac044 = '" + s.aac044 + "' AND id=" + str_id;
                db.GetSqlCmd(sql);
                int f = db.GetSqlCmd(gxsql);
                if (f > 0)
                {
                    MessageBox.Show("更新就诊登记成功");
                }
            }
        }
예제 #4
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;
        }
예제 #5
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();
                }
            }
        }
예제 #6
0
        public void cydj()
        {
            string cyks  = "";
            var    lryks = (from r in qj.akf002 where r.Value == txtakf002.Text.Trim() select r.Key).ToList <string>();

            if (lryks.Count > 0)
            {
                cyks = lryks[0];
            }
            string cyyy = (from r in qj.ykc195 where r.Value == comykc195.SelectedItem.ToString() select r.Key).ToList <string>()[0];

            string xml = "<?xml version=\"1.0\" encoding=\"GBK\"?>"
                         + "<input>"
                         + "<aab299>" + PublicCommon.aab299 + "</aab299>"
                         + "<yab600>" + PublicCommon.yab600 + "</yab600>"
                         + "<akb026>" + PublicCommon.akb026 + "</akb026>"
                         + "<akb021>" + PublicCommon.akb021 + "</akb021>"
                         + "<ykc700>" + ykc700 + "</ykc700>"
                         + "<aab301>" + s.aab301 + "</aab301>"
                         + "<yab060>" + s.yab060 + "</yab060>"
                         + "<aac002>" + s.aac002 + "</aac002>"
                         + "<aac043>" + s.aac043 + "</aac043>"
                         + "<aac044>" + s.aac044 + "</aac044>"
                         + "<akf002>" + cyks + "</akf002>"
                         + "<yzz088>" + txtyzz088.Text.Trim() + "</yzz088>"
                         + "<yzz089>" + txtyzz089.Text.Trim() + "</yzz089>"
                         + "<ykc016>" + txtykc016.Text.Trim() + "</ykc016>"
                         + "<akc185>" + txtakc185.Text.Trim() + "</akc185>"
                         + "<akc196>" + txtakc196.Text.Trim() + "</akc196>"
                         + "<akc188>" + txtakc188.Text.Trim() + "</akc188>"
                         + "<akc189>" + txtakc189.Text.Trim() + "</akc189>"
                         + "<akc056>" + txtakc056.Text.Trim() + "</akc056>"
                         + "<ake021>" + txtake021.Text.Trim() + "</ake021>"
                         + "<ykc195>" + cyyy + "</ykc195>"
                         + "<ykc683>" + txtykc683.Text.Trim() + "</ykc683>"
                         + "<ykc702>" + dtpykc702.Text.Trim() + "</ykc702>"
                         + "<akb063>" + txtakb063.Text.Trim() + "</akb063>"
                         + "<yzz020>" + txtyzz020.Text.Trim() + "</yzz020>"
                         + "<aae011>" + txtaae011.Text.Trim() + "</aae011>"
                         + "<ykc018>" + dtpykc018.Text.Trim() + "</ykc018>"
                         + "</input>";
            string resultxml = qj.cscf("0215", xml);

            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
            {
                string errormsg = res.SelectSingleNode("errormsg").InnerText;
                string sign     = res.SelectSingleNode("sign").InnerText;
                string transid  = res.SelectSingleNode("transid").InnerText;

                cydj cy   = new cydj();
                var  pros = cy.GetType().GetProperties();

                XmlDocument ixd = new XmlDocument();
                ixd.LoadXml(xml);
                XmlNode ipt = ixd.SelectSingleNode("//input");

                for (int i = 0; i < pros.Length; i++)
                {
                    if (pros[i].Name == "sign" || pros[i].Name == "transid")
                    {
                        continue;
                    }
                    pros[i].SetValue(cy, ipt.SelectSingleNode(pros[i].Name).InnerText, null);
                }


                cy.transid = transid;
                cy.sign    = sign;

                string sql = qj.getSql(cy, "cydj", str_id, null);

                DBConn db = new DBConn();
                db.GetSqlCmd(sql);
                MessageBox.Show("出院登记操作成功");
                qj.gxStatus(3, s.aac044, str_id);
            }
        }