Bll/BComment.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using Dal;
using System.Data;
namespace Bll
{
public class BComment
{
DComment idp = new DComment();
/// <summary>
/// 增加一条记录
/// </summary>
/// <param name="mpt"></param>
/// <returns></returns>
public string Add(MComment mpt)
{
mpt.P_Id = idp.GetMaxId() + 1;
mpt.P_Order = idp.GetMaxOrder() + 1;
if (mpt.P_Name == string.Empty)
{
return "产品名称不能为空!";
}
idp.Add(mpt);
return string.Empty;
}
public DataTable GetList(int PageSize, int PageIndex, string PS_Address, string Keywords, out int rCount)
{
return idp.GetList(PageIndex, PageSize, PS_Address, Keywords, out rCount);
}
public MComment GetModel(int P_Id)
{
return idp.GetModel(P_Id);
}
public string Mod(MComment mpt)
{
if (mpt.P_Name == string.Empty)
{
return "标题不能为空!";
}
idp.Mod(mpt);
return string.Empty;
}
public string Del(int PS_Id)
{
idp.Del(PS_Id);
return string.Empty;
}
//设置是否推荐
public void SetSpecial(MComment mpt, bool status)
{
if (status)
{
mpt.P_Special = 0;
}
后面还有 95 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
