GeneralWeb.DALSQLite/NT_Class_Book.cs

(开头部分) 28KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Data.SQLite;
using System.Text;
using GeneralWeb.DALFactory;
namespace GeneralWeb.DALSQLite
{
    //NT_Class_Book
    public class NT_Class_Book : INT_Class_Book
    {
        private string tableName = "NT_Class_Book";

        public NT_Class_Book()
        { }

        /// <summary>
        /// 添加一条数据
        /// </summary>
        /// <param name="model">要添加的数据model</param>
        /// <returns>添加成功则返回true;添加失败则返回false</returns>
        public bool Add(GeneralWeb.Model.NT_Class_Book model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into " + tableName + "(");
            strSql.Append(" ItemId , ");
            strSql.Append(" FatherId , ");
            strSql.Append(" Sort , ");
            strSql.Append(" Depth , ");
            strSql.Append(" ClassName , ");
            strSql.Append(" Show , ");
            strSql.Append(" Templates , ");
            strSql.Append(" Description  ");
            strSql.Append(") values (");
            strSql.Append(" @ItemId , ");
            strSql.Append(" @FatherId , ");
            strSql.Append(" @Sort , ");
            strSql.Append(" @Depth , ");
            strSql.Append(" @ClassName , ");
            strSql.Append(" @Show , ");
            strSql.Append(" @Templates , ");
            strSql.Append(" @Description  ");
            strSql.Append(") ");


            SQLiteParameter[] parameters = {
                    new SQLiteParameter("@Id", DbType.Int32,4), 
                     new SQLiteParameter("@ItemId", DbType.String,12), 
                     new SQLiteParameter("@FatherId", DbType.String,12), 
                     new SQLiteParameter("@Sort", DbType.Int32,4), 
                     new SQLiteParameter("@Depth", DbType.Int32,4), 
                     new SQLiteParameter("@ClassName", DbType.String), 
                     new SQLiteParameter("@Show", DbType.Boolean,1), 
                     new SQLiteParameter("@Templates", DbType.String), 
                     new SQLiteParameter("@Description", DbType.String)               
                    };

            parameters[0].Value = model.Id;
后面还有 679 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。