App_Code/Adpic/ad.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.Web;
using System.Data;

namespace BLL.Ad
{
    /// <summary>
    ///广告管理
    /// </summary>
    public class ad
    {
        public static string detailTbl = "Bs_ad";
        public static string kindTbl = "BS_AdKindCode";
        public ad()
        {
            //
            //TODO: 在此处添加构造函数逻辑
            //
        }

        /// <summary>
        /// 获取广告列表
        /// </summary>
        /// <param name="code">广告类别编码,null或者""则返回全部</param>
        /// <param name="pagesize">条数size,0返回全部</param>
        /// <returns></returns>
        public static DataTable getad(string code, int size)
        { 
           string top= size > 0 ? "  top "+ size:"";
           string where = " 1=1 ";
           if (code != "" &&code != null)
           {
               where += string.Format(" and  {0}='{1}'", kindTbl, code);     
           }
           string sql = string.Format("select {0} * from {1} where  {2} order by sortno,id desc ",top,detailTbl,where);
           return CSA.DAL.DBAccess.getRS(sql);
        }
        ///<summary>
        ///获取单条广告
        ///</summary>
        ///<param name="code">广告类别编码,null赐返回全部</param>
        ///<returns></returns>
        public static DataRow getonead(string code)
        {
          string  where = "";
            if (code != null)
            {
                where = string.Format(" and  {0} ='{1}'", kindTbl, code);
            }
            string sql = string.Format("select *  from {0} where 1=1 {1} order by sortno,id desc",detailTbl,where);
           DataTable dt= CSA.DAL.DBAccess.getRS(sql);
           if (dt.Rows.Count > 0)
           {
               return dt.Rows[0];
           }
           return null;
        }


后面还有 21 行代码,购买后查看完整代码

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

AI 解读 AI

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

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