DAL/BaseConfigService.cs

(开头部分) 9KB

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

using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;

namespace DAL
{
	/// <summary>
	/// 数据访问类BaseConfigService。
	/// </summary>
	public class BaseConfigService
	{
		public BaseConfigService()
		{}
		#region  成员方法
        /// <summary>
        /// 设置值
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static int SetValue_Name(int id, string value)
        {
            string sql = "update BaseConfig set proName = '" + value + "' where id = " + id;
            return DBHelperSQL.ExecuteSql(sql);
        }
        /// <summary>
        /// 获取值
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static string GetById_Name(int id)
        {
            string sql = "select proName from BaseConfig where id = " + id;
            object obj = DBHelperSQL.GetSingle(sql);
            if (obj != null)
            {
                return obj.ToString();
            }
            else
            {
                return "";
            }
        }
        /// <summary>
        /// 首页套餐类型排名图片
        /// </summary>
        /// <param name="orderNum"></param>
        /// <returns></returns>
        public static string GetImg(int orderNum) 
        {
            string sql = "select remark from BaseConfig where parentId = " + orderNum;
            object obj = DBHelperSQL.GetSingle(sql);
            if(obj != DBNull.Value && obj != null)
            {
                return obj.ToString();
            }
            return "in_pbg4.png";
        }

        /// <summary>
后面还有 251 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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