示例#1
0
        /// <summary>
        /// 保存健康档案
        /// </summary>
        /// <param name="ryxx">人员信息</param>
        /// <param name="sqls"></param>
        /// <returns></returns>
        public int SaveJkda(TjZybRyxx ryxx, TjZybZz zz, TjGyzz gyzz, TjZybGqf gqf)
        {
            List <string> sqls = sqls = new List <string>();

            if (HasExist(ryxx.Tjbh, ryxx.Tjcs))
            {
                Update(ryxx, sqls);
            }
            else
            {
                InsertRyxx(ryxx, sqls);
            }
            TjZybZzBiz zzBiz = new TjZybZzBiz();

            if (zzBiz.HasExist(zz.tjbh, zz.tjcs))
            {
                zzBiz.Update(zz, sqls);
            }
            else
            {
                zzBiz.Insert(zz, sqls);
            }
            TjGyzzBiz gyzzBiz = new TjGyzzBiz();

            gyzzBiz.Delete(gyzz.tjbh, gyzz.tjcs, sqls);
            gyzzBiz.Insert(gyzz, sqls);

            TjZybGqfBiz gqfBiz = new TjZybGqfBiz();

            if (gqfBiz.HasExist(gqf.tjbh))
            {
                gqfBiz.Update(gqf, sqls);
            }
            else
            {
                gqfBiz.Insert(gqf, sqls);
            }

            return(base.SqlDBAgent.sqlupdate(sqls));
        }
示例#2
0
        public void Update(TjZybGqf gqf, List <string> sqls)
        {
            StringBuilder sql = new StringBuilder("update tj_zyb_gqf set ph='" + gqf.ph + "',");

            sql.Append("xyy_xt='" + gqf.xyy_xt + "',");
            sql.Append("xyy_bbfwy='" + gqf.xyy_bbfwy + "',");
            sql.Append("xyy_bbfwz='" + gqf.xyy_bbfwz + "',");
            sql.Append("xyyjj='" + gqf.xyyjj + "',");
            sql.Append("dyy_xyysf='" + gqf.dyy_xyysf + "',");
            sql.Append("dyy_dyysf='" + gqf.dyy_dyysf + "',");
            sql.Append("bw='" + gqf.bw + "',");
            sql.Append("xbm='" + gqf.xbm + "',");
            sql.Append("mmzh='" + gqf.mmzh + "',");
            sql.Append("xmgh='" + gqf.xmgh + "',");
            sql.Append("xypl='" + gqf.xypl + "',");
            sql.Append("fjfh='" + gqf.fjfh + "',");
            sql.Append("zd='" + gqf.zd + "',");
            sql.Append("jg='" + gqf.jg + "'");
            sql.Append(" where tjbh='" + gqf.tjbh + "'");

            sqls.Add(sql.ToString());
        }
示例#3
0
        public void Insert(TjZybGqf gqf, List <string> sqls)
        {
            StringBuilder sql = new StringBuilder("insert into tj_zyb_gqf(TJBH,ph,xyy_xt,xyy_bbfwy,xyy_bbfwz,xyyjj,dyy_xyysf,dyy_dyysf," +
                                                  "bw,xbm,mmzh,xmgh,xypl,fjfh,zd,sm,jg) values('");

            sql.Append(gqf.tjbh + "','");
            sql.Append(gqf.ph + "','");
            sql.Append(gqf.xyy_xt + "','");
            sql.Append(gqf.xyy_bbfwy + "','");
            sql.Append(gqf.xyy_bbfwz + "','");
            sql.Append(gqf.xyyjj + "','");
            sql.Append(gqf.dyy_xyysf + "','");
            sql.Append(gqf.dyy_dyysf + "','");
            sql.Append(gqf.bw + "','");
            sql.Append(gqf.xbm + "','");
            sql.Append(gqf.mmzh + "','");
            sql.Append(gqf.xmgh + "','");
            sql.Append(gqf.xypl + "','");
            sql.Append(gqf.fjfh + "','");
            sql.Append(gqf.zd + "','");
            sql.Append(gqf.sm + "','");
            sql.Append(gqf.jg + "')");
            sqls.Add(sql.ToString());
        }