📄 commentpkzone.cs
字号:
namespace PowerEasy.Contents
{
using PowerEasy.Common;
using PowerEasy.IDal.Contents;
using PowerEasy.Model.Contents;
using System;
using System.Collections.Generic;
public sealed class CommentPKZone
{
private static readonly ICommentPKZone dal = DataAccess.CreateCommentPKZone();
private CommentPKZone()
{
}
public static void Add(CommentPKZoneInfo commentPKZoneInfo)
{
commentPKZoneInfo.PKId = MaxCommentPKZoneId() + 1;
EncodeCommentPKZoneInfo(commentPKZoneInfo);
dal.Add(commentPKZoneInfo);
}
private static void DecodeCommentPKZoneInfo(CommentPKZoneInfo commentPKZoneInfo)
{
if (commentPKZoneInfo != null)
{
commentPKZoneInfo.Content = DataSecurity.HtmlDecode(commentPKZoneInfo.Content);
}
}
public static void Delete(int pkId)
{
dal.Delete(pkId);
}
public static void DeleteByCommentId(int commentId)
{
dal.DeleteByCommentId(commentId);
}
private static void EncodeCommentPKZoneInfo(CommentPKZoneInfo commentPKZoneInfo)
{
if (commentPKZoneInfo != null)
{
commentPKZoneInfo.Content = DataSecurity.HtmlEncode(commentPKZoneInfo.Content);
}
}
public static IList<CommentPKZoneInfo> GetList(int startRowIndexId, int maxNumberRows, int commentId)
{
return dal.GetList(startRowIndexId, maxNumberRows, commentId);
}
public static IList<CommentPKZoneInfo> GetList(int startRowIndexId, int maxNumberRows, int commentId, int position)
{
return dal.GetList(startRowIndexId, maxNumberRows, commentId, position);
}
public static CommentPKZoneInfo GetModelInfo(int pkId)
{
CommentPKZoneInfo modelInfo = dal.GetModelInfo(pkId);
DecodeCommentPKZoneInfo(modelInfo);
return modelInfo;
}
public static int GetPKCount(int commentId, int position)
{
return dal.GetPKCount(commentId, position);
}
public static int GetTotalOfCommentPKZoneInfo(int commentId)
{
return dal.GetTotalOfCommentPKZoneInfo();
}
public static int GetTotalOfCommentPKZoneInfo(int commentId, int position)
{
return dal.GetTotalOfCommentPKZoneInfo();
}
public static int MaxCommentPKZoneId()
{
return dal.MaxCommentPKZoneId();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -