DAL/AgencyNewsInfoAccess.cs

(开头部分) 9KB

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

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

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

        /// <summary>
        /// 分页查询资讯信息
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        public DataTable GetAllNewsInfo(int PageIndex, int PageSize, out int PageCount, out int RecordCount, string strWhere)
        {
            try
            {

                string strSql = " SELECT P.newsId,P.newsClassID,P.newsTitle,P.dateTime,P.isChecked,P.writer,C.id,C.newsClassName,C.newsClassKey,C.newsClassDes FROM tb_AgencyNews P  " +
                                " LEFT JOIN tb_AgencyClass C ON P.newsClassID=C.id ";
                string strShow = " newsId,newsTitle,newsClassName,dateTime,isChecked,writer,newsClassKey,newsClassDes ";
                return AccessHelper.ExecutePager(PageIndex, PageSize, "newsId", strShow, strSql, strWhere, " newsId DESC ", out PageCount, out RecordCount);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        /// <summary>
        /// 根据分类ID,分页查询资讯信息
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        public DataTable GetNewsListByClD(int PageIndex, int PageSize, out int PageCount, out int RecordCount, string strWhere, int classId)
        {
            try
            {

                string strSql = "select * from tb_AgencyNews where isChecked='1' and newsClassID='" + classId + "'";
                string strShow = " newsId,newsTitle,dateTime,isChecked,writer ";
                return AccessHelper.ExecutePager(PageIndex, PageSize, "newsId", strShow, strSql, strWhere, " newsId DESC ", out PageCount, out RecordCount);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

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

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

AI 解读 AI

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

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