📄 specialtype.cs
字号:
namespace PowerEasy.WebSite.Controls.FieldControl
{
using PowerEasy.Common;
using PowerEasy.Components;
using PowerEasy.Contents;
using PowerEasy.Model.Contents;
using System;
using System.Text;
using System.Web;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class SpecialType : BaseFieldControl
{
protected HiddenField HdnSpecial;
protected string path = "";
protected HtmlTableRow Tab;
protected HtmlGenericControl UlSpecial;
private void InitSpecial()
{
int generalId = DataConverter.CLng(HttpContext.Current.Request["GeneralId"]);
StringBuilder builder = new StringBuilder();
if (generalId > 0)
{
string specialInfoIds = Special.GetSpecialInfoIds(generalId);
string[] strArray = specialInfoIds.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < strArray.Length; i++)
{
SpecialInfo specialInfoById = Special.GetSpecialInfoById(DataConverter.CLng(strArray[i]));
SpecialCategoryInfo specialCategoryInfoById = Special.GetSpecialCategoryInfoById(specialInfoById.SpecialCategoryId);
builder.Append("\n<span id='SpecialSpanId" + specialInfoById.SpecialId + "'>");
builder.Append(specialCategoryInfoById.SpecialCategoryName + ">>" + specialInfoById.SpecialName);
builder.Append(" <input type='button' class='button' onclick=\"javascript:DelSpecial('" + specialInfoById.SpecialId + "')\" value='从此专题中移除' /><br /></span>");
}
this.HdnSpecial.Value = specialInfoIds;
}
if (builder.Length <= 0)
{
builder.Append("<span id='SpecialSpanId0'>无专题<br /></span>");
}
this.UlSpecial.InnerHtml = builder.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
this.path = base.BasePath;
this.path = this.Page.Request.Url.Scheme + "://" + this.Page.Request.Url.Authority + this.path;
if (base.IsAdminManage)
{
this.path = this.path + SiteConfig.SiteOption.ManageDir;
}
else
{
this.path = this.path + "User";
}
if (!base.IsPostBack)
{
this.InitSpecial();
}
}
public override string FieldValue
{
get
{
return this.HdnSpecial.Value;
}
set
{
base.FieldValue = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -