/// <summary> /// 更新报告词句 /// </summary> /// <param name="wordItem"></param> /// <returns></returns> public bool UpdateWordItem(ReportWordsInfoData wordItem) { SQL sql = SqlHelper.CreateSQL("更新报告词句信息", "update 影像词句信息 set 词句名称=:词句名称, 词句分类ID=:词句分类ID, 词句信息=:词句信息 where 词句ID=:词句ID"); sql.AddParameter("词句名称", DbType.String, wordItem.词句名称); sql.AddParameter("词句分类ID", DbType.String, wordItem.词句分类ID); sql.AddParameter("词句信息", DbType.String, wordItem.词句信息.ToString()); sql.AddParameter("词句ID", DbType.String, wordItem.词句ID); _dbHelper.ExecuteSQL(sql); return(true); }
/// <summary> /// 新增报告词句 /// </summary> /// <param name="wordItem"></param> /// <returns></returns> public bool NewWordItem(ReportWordsInfoData wordItem) { SQL sql = SqlHelper.CreateSQL("插入报告词句信息", "insert into 影像词句信息(词句ID, 词句分类ID, 词句名称, 词句信息)" + "values(:词句ID, :词句分类ID, :词句名称, :词句信息)"); sql.AddParameter("词句ID", DbType.String, wordItem.词句ID); sql.AddParameter("词句分类ID", DbType.String, wordItem.词句分类ID); sql.AddParameter("词句名称", DbType.String, wordItem.词句名称); sql.AddParameter("词句信息", DbType.String, wordItem.词句信息.ToString()); _dbHelper.ExecuteSQL(sql); return(true); }
public ReportWordsInfoData GetWordInfoById(string wordId) { SQL sql = SqlHelper.CreateSQL("根据ID查询词句信息", "select 词句ID,词句分类ID,词句名称,词句信息 from 影像词句信息 where 词句DI=:词句ID"); sql.AddParameter("词句ID", wordId); DataTable dtWord = _dbHelper.ExecuteSQL(sql); if (dtWord == null || dtWord.Rows.Count <= 0) { return(null); } ReportWordsInfoData wordData = new ReportWordsInfoData(); wordData.BindRowData(dtWord.Rows[0]); return(wordData); }