DAL/PictureNewsAccess.cs

(开头部分) 5KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Model;

namespace DAL
{
    public class PictureNewsAccess
    {
        DBbase db = new DBbase();
        SysLogAccess sysLogAccess = new SysLogAccess();
        SysLog sysLogModel = new SysLog();
        public PictureNewsAccess()
        { }

        /// <summary>
        /// 分页查询产品信息
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        public DataTable GetPictureNews(int PageIndex, int PageSize, out int PageCount, out int RecordCount, string strWhere)
        {
            try
            {
                string strSql = " SELECT * FROM tb_PictureNews ";
                string strShow = " * ";
                return AccessHelper.ExecutePager(PageIndex, PageSize, "picNewsId", strShow, strSql, strWhere, " picNewsId DESC ", out PageCount, out RecordCount);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        /// <summary>
        /// 获取所有新闻
        /// </summary>
        /// <returns></returns>
        public DataTable GetAllPicNews()
        {
            string strSql = "select * from tb_PictureNews";
            return db.ReturnTable(strSql);
        }

        /// <summary>
        /// 根据id删除图片新闻信息
        /// </summary>
        /// <param name="strProClass"></param>
        /// <returns></returns>
        public bool DelPicNewsByID(string picNewsId)
        {
            sysLogModel.logClass = 3;
            string[] strgroup = picNewsId.Split(',');
            foreach (string item in strgroup)
            {
                sysLogModel.logNote = "促销新闻——" + GetPictureNewsByID(item)["picNewsTitle"];
                sysLogAccess.AddSysLog(sysLogModel);
后面还有 92 行代码,购买后查看完整代码

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

AI 解读 AI

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

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