📄 commentpost.ascx.cs
字号:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using DNNLite.Entites.Modules;
using DNNLite.DesktopModules.Comment;
using NHibernate.Expression;
using DNNLite.Service;
using Ader.TemplateEngine;
public partial class DesktopModules_Comment_CommentPost : CommentPage
{
protected string posturl;
protected void Page_Load(object sender, EventArgs e)
{
if (needcomment && ischecked)
{
CommentSubject csub = CommentSubject.FindFirst(new EqExpression("CommentKey", key));
if (csub == null)
{
csub = new CommentSubject();
csub.Antis = 0;
csub.Backers = 0;
csub.CommentCount = 0;
csub.CommentKey = key;
csub.Neutrals = 0;
csub.Subject = subject;
csub.SourceTabModule = sourcetabmoduleid;
csub.CreateAndFlush();
}
posturl = ResolveUrl("~/DesktopModules/Comment/CPost.aspx?" +
"commenttabmoduleid=" + TabModuleInfo.TabModuleId +
"&sourcetabmoduleid=" + sourcetabmoduleid +
"&commentkey=" + key +
"&commentid=" + csub.Id +
"&commentcheck=" + DNNLite.Util.MD5CheckSum.MD5Hash(key)
);
string templetfile =
Settings.ContainsKey("Templet") ?
Settings["Templet"] :
"~/Templets/Comment/提交评论.htm";
TemplateManager tm= TemplateManager.FromFile(
Server.MapPath(templetfile )
);
tm.SetValue("posturl", posturl);
litForm.Text = tm.Process();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -