/// <summary>
        /// 新增模板格式
        /// </summary>
        /// <param name="wordClass"></param>
        /// <returns></returns>
        public bool NewTemplateFormat(ReportTemplateFormatData templateFormat)
        {
            SQL sql = SqlHelper.CreateSQL("插入报告模板格式", "insert into 影像模板格式(格式ID,  模板ID, 格式名称, 格式信息, 版本)" +
                                          "values(:格式ID,  :模板ID, :格式名称, :格式信息, :版本)");

            sql.AddParameter("格式ID", DbType.String, templateFormat.格式ID);
            sql.AddParameter("模板ID", DbType.String, templateFormat.模板ID);
            sql.AddParameter("格式名称", DbType.String, templateFormat.格式名称);
            sql.AddParameter("版本", DbType.Int32, templateFormat.版本);
            sql.AddParameter("格式信息", DbType.String, templateFormat.格式信息.ToString());
            //sql.AddParameter("关联词句", DbType.String, templateFormat.关联词句.ToString());

            _dbHelper.ExecuteSQL(sql);

            return(true);
        }
        /// <summary>
        /// 更新报告格式信息
        /// </summary>
        /// <param name="templateItem"></param>
        /// <returns></returns>
        public bool UpdateTemplateFormat(ReportTemplateFormatData templateFormat)
        {
            SQL sql = CreateSQL("更新报告模板格式", "update 影像模板格式 set 格式名称=:格式名称, 模板ID=:模板ID, 版本=:版本, 格式信息=:格式信息 where 格式ID=:格式ID");//, 关联词句=:关联词句


            sql.AddParameter("格式名称", DbType.String, templateFormat.格式名称);
            sql.AddParameter("模板ID", DbType.String, templateFormat.模板ID);
            sql.AddParameter("版本", DbType.Int32, templateFormat.版本);
            sql.AddParameter("格式信息", DbType.String, templateFormat.格式信息.ToString());
            //sql.AddParameter("关联词句", DbType.String, templateFormat.关联词句.ToString());
            sql.AddParameter("格式ID", DbType.String, templateFormat.格式ID);

            sql.ExecuteSql();

            return(true);
        }
Example #3
0
        public ReportTemplateFormatData GetReportFormatData(string formatId)
        {
            SQL sql = SqlHelper.CreateSQL("获取报告模板格式", "select 格式ID, 模板ID,格式名称, 格式信息, 版本 From 影像模板格式 where 格式ID=:格式ID");

            sql.AddParameter("格式ID", DbType.String, formatId);

            DataTable dtFormats = _dbHelper.ExecuteSQL(sql);

            if (dtFormats == null || dtFormats.Rows.Count <= 0)
            {
                return(null);
            }

            ReportTemplateFormatData formatsData = new ReportTemplateFormatData();

            formatsData.BindRowData(dtFormats.Rows[0]);

            return(formatsData);
        }