/*
* 创建人:李要南
* 创建时间:2008-12-7 4:31
* 说明:新闻评论表业务类
* 版权所有:李要南
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Model;
using DAL;
namespace BLL
{
public class CommentManager
{
private CommentDAL cdal=null;
public CommentManager()
{
cdal = new CommentDAL();
}
#region 根据新闻ID取出新闻的所有评论
/// <summary>
/// 根据新闻ID取出新闻的所有评论
/// </summary>
/// <param name="newId"></param>
/// <returns></returns>
public DataTable SelectByNewsId(string newId)
{
return cdal.SelectByNewsId(newId);
}
#endregion
#region 添加评论
/// <summary>
/// 添加评论
/// </summary>
/// <param name="c">评论实体类</param>
/// <returns></returns>
public bool Insert(Comment c)
{
return cdal.Insert(c);
}
#endregion
#region 删除评论
/// <summary>
/// 删除评论
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public bool Delete(string id)
{
return cdal.Delete(id);
}
#endregion
}
}