DTcms.Web.UI/Label/article_comment.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace DTcms.Web.UI
{
public partial class BasePage : System.Web.UI.Page
{
/// <summary>
/// 评论数据总数
/// </summary>
/// <param name="article_id">主表ID</param>
/// <param name="strwhere">查询条件</param>
/// <returns>Int</returns>
protected int get_comment_count(int article_id, string strwhere)
{
int count = 0;
if (article_id > 0)
{
string _where = string.Format("article_id={0}", article_id);
if (!string.IsNullOrEmpty(strwhere))
{
_where += " and " + strwhere;
}
count = new BLL.article_comment().GetCount(_where);
}
return count;
}
/// <summary>
/// 评论列表
/// </summary>
/// <param name="article_id">主表ID</param>
/// <param name="top">显示条数</param>
/// <param name="strwhere">查询条件</param>
/// <returns>DateTable</returns>
protected DataTable get_comment_list(int article_id, int top, string strwhere)
{
DataTable dt = new DataTable();
if (article_id > 0)
{
string _where = string.Format("article_id={0}", article_id);
if (!string.IsNullOrEmpty(strwhere))
{
_where += " and " + strwhere;
}
dt = new BLL.article_comment().GetList(top, _where, "add_time desc").Tables[0];
}
return dt;
}
/// <summary>
/// 评论分页列表
/// </summary>
/// <param name="article_id">主表ID</param>
/// <param name="page_size">页面大小</param>
/// <param name="page_index">当前页码</param>
/// <param name="strwhere">查询条件</param>
/// <param name="totalcount">总记录数</param>
后面还有 21 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
