Exemple #1
0
        /// <summary>
        /// 插入体检报告设置
        /// </summary>
        /// <param name="tjbg"></param>
        /// <param name="mxes"></param>
        /// <returns></returns>
        public int Insert(SzTjbg tjbg, List <SzTjbgMx> mxes)
        {
            List <string> sqls = new List <string>();

            InsertSzTjbg(tjbg, sqls);
            for (int i = 0; i < mxes.Count; i++)
            {
                InsertSzTjbgMx(mxes[i], sqls);
            }

            return(base.SqlDBAgent.sqlupdate(sqls));
        }
Exemple #2
0
        public void UpdateSzTjbg(SzTjbg tjbg, List <string> sqls)
        {
            StringBuilder sql = new StringBuilder("update  sz_tjbg set maxdate='" + tjbg.Maxdate + "',");

            sql.Append("tjrs='" + tjbg.Tjrs + "',");
            sql.Append("mindate='" + tjbg.Mindate + "',");
            sql.Append("rylb='" + tjbg.Rylb + "',");
            sql.Append("tjxm='" + tjbg.Tjxm + "',");
            sql.Append("tjjl='" + tjbg.Tjjl + "'");
            sql.Append(" where bgid='" + tjbg.Bgid + "'");

            sqls.Add(sql.ToString());
        }
        SzTjbg GetTjbg(string bgid)
        {
            SzTjbg tjbg = new SzTjbg();
            tjbg.Maxdate = this.maxdate.ToString();
            tjbg.Mindate = this.mindate.ToString();
            tjbg.Rylb = cmbRylb.Text.Trim();
            tjbg.Sjdw = txtDw.Tag.ToString();
            //tjbg.Tjjl = txtTjjl.Text.Trim();
            tjbg.Tjjl = richTextBox1.Text.Trim();
            tjbg.Tjrs = txtTjrs.Text.Trim();
            tjbg.Tjxm = txtTjxm.Text.Trim();
            tjbg.Bgid = bgid;

            return tjbg;
        }
Exemple #4
0
        /// <summary>
        /// 更新体检报告设置
        /// </summary>
        /// <param name="tjbg"></param>
        /// <param name="mxes"></param>
        /// <param name="type">-1:插入</param>
        /// <returns></returns>
        public int GxTjbgSz(SzTjbg tjbg, List <SzTjbgMx> mxes, int type)
        {
            int i = -1;

            if (type == -1)
            {
                i = Insert(tjbg, mxes);
            }
            else
            {
                i = Update(tjbg, mxes);
            }

            return(i);
        }
Exemple #5
0
        /// <summary>
        /// 插入记录
        /// </summary>
        /// <param name="maxdate"></param>
        /// <param name="sjdw"></param>
        /// <param name="tjrs"></param>
        /// <param name="tjxm"></param>
        /// <param name="tjjl"></param>
        /// <param name="sqls"></param>
        public void InsertSzTjbg(SzTjbg tjbg, List <string> sqls)
        {
            StringBuilder sql = new StringBuilder("insert into sz_tjbg(maxdate,mindate,rylb,bgid,sjdw,tjrs,tjxm,tjjl) values('");

            sql.Append(tjbg.Maxdate + "','");
            sql.Append(tjbg.Mindate + "','");
            sql.Append(tjbg.Rylb + "','");
            sql.Append(tjbg.Bgid + "','");
            sql.Append(tjbg.Sjdw + "','");
            sql.Append(tjbg.Tjrs + "','");
            sql.Append(tjbg.Tjxm + "','");
            sql.Append(tjbg.Tjjl + "')");

            sqls.Add(sql.ToString());
        }