DAL/online_service.cs

(开头部分) 8KB

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

using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using DBUtility;
using Common;

namespace Web.Plugin.LineService.DAL
{
    /// <summary>
    /// 数据访问类:online_service
    /// </summary>
    public partial class online_service
    {
        public online_service()
        { }
        #region  Method

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int id)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from dt_online_service");
            strSql.Append(" where id=@id ");
            SqlParameter[] parameters = {
					new SqlParameter("@id", SqlDbType.Int,4)};
            parameters[0].Value = id;

            return DbHelperSQL.Exists(strSql.ToString(), parameters);
        }


        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Model.online_service model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into dt_online_service(");
            strSql.Append("group_id,title,img_url,link_url,sort_id,is_lock)");
            strSql.Append(" values (");
            strSql.Append("@group_id,@title,@img_url,@link_url,@sort_id,@is_lock)");
            SqlParameter[] parameters = {
					new SqlParameter("@group_id", SqlDbType.Int,4),
					new SqlParameter("@title", SqlDbType.VarChar,100),
					new SqlParameter("@img_url", SqlDbType.VarChar,255),
					new SqlParameter("@link_url", SqlDbType.VarChar,255),
					new SqlParameter("@sort_id", SqlDbType.Int,4),
					new SqlParameter("@is_lock", SqlDbType.Int,4)};
            parameters[0].Value = model.group_id;
            parameters[1].Value = model.title;
            parameters[2].Value = model.img_url;
            parameters[3].Value = model.link_url;
            parameters[4].Value = model.sort_id;
            parameters[5].Value = model.is_lock;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            return rows;
后面还有 164 行代码,购买后查看完整代码

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

AI 解读 AI

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

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