Beispiel #1
0
        /// <summary>
        /// 更新报告词句分类
        /// </summary>
        /// <param name="wordClass"></param>
        /// <returns></returns>
        public bool UpdateWordClass(ReportWordsClassData wordClass)
        {
            SQL sql = SqlHelper.CreateSQL("更新报告词句分类", "update 影像词句分类 set 分类名称=:分类名称, 上级分类ID=:上级分类ID, 分类信息=:分类信息 where 词句分类ID=:词句分类ID");


            sql.AddParameter("分类名称", DbType.String, wordClass.分类名称);
            sql.AddParameter("上级分类ID", DbType.String, wordClass.级分类ID);
            sql.AddParameter("分类信息", DbType.String, wordClass.分类信息.ToString());
            sql.AddParameter("词句分类ID", DbType.String, wordClass.词句分类ID);

            _dbHelper.ExecuteSQL(sql);

            return(true);
        }
Beispiel #2
0
        //public DataTable GetWordsByClass(string wordClassId)
        //{

        //}

        /// <summary>
        /// 新增词句分类
        /// </summary>
        /// <param name="wordClass"></param>
        /// <returns></returns>
        public bool NewWordClass(ReportWordsClassData wordClass)
        {
            SQL sql = SqlHelper.CreateSQL("插入报告词句分类", "insert into 影像词句分类(词句分类ID, 上级分类ID, 影像类别, 分类名称, 分类信息)" +
                                          "values(:词句分类ID, :上级分类ID, :影像类别, :分类名称, :分类信息)");

            sql.AddParameter("词句分类ID", DbType.String, wordClass.词句分类ID);
            sql.AddParameter("上级分类ID", DbType.String, wordClass.级分类ID);
            sql.AddParameter("影像类别", DbType.String, wordClass.影像类别);
            sql.AddParameter("分类名称", DbType.String, wordClass.分类名称);
            sql.AddParameter("分类信息", DbType.String, wordClass.分类信息.ToString());

            _dbHelper.ExecuteSQL(sql);

            return(true);
        }