📄 ajaxnote.cs
字号:
namespace PowerEasy.WebSite.Controls.WebPart
{
using PowerEasy.Components;
using PowerEasy.Enumerations;
using PowerEasy.Model.UserManage;
using PowerEasy.ModelControls;
using PowerEasy.UserManage;
using PowerEasy.Web.UI;
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public class AjaxNote : BaseWebPart, IWebPartPermissibility
{
protected PowerEasy.Enumerations.OperateCode m_OperateCode;
protected TextBox TxtEditor;
protected UpdatePanel UpTxtEditor;
protected void Page_Load(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(base.Title))
{
base.Title = "备忘录(自动保存)";
}
if (!this.Page.IsPostBack)
{
if (base.Session["AdminNoteText"] != null)
{
this.TxtEditor.Text = base.Session["AdminNoteText"].ToString();
}
else
{
AdminProfileInfo adminProfile = AdminProfile.GetAdminProfile(PEContext.Current.Admin.AdminName);
if (!adminProfile.IsNull)
{
this.TxtEditor.Text = adminProfile.NoteText;
}
}
}
}
protected void TxtEditor_TextChanged(object sender, EventArgs e)
{
base.Session["AdminNoteText"] = this.TxtEditor.Text;
string adminName = PEContext.Current.Admin.AdminName;
AdminProfileInfo adminProfile = AdminProfile.GetAdminProfile(adminName);
adminProfile.NoteText = this.TxtEditor.Text;
if (!adminProfile.IsNull)
{
AdminProfile.Update(adminProfile);
}
else
{
adminProfile.AdminName = adminName;
AdminProfile.Add(adminProfile);
}
}
[Personalizable(PersonalizationScope.User)]
public PowerEasy.Enumerations.OperateCode OperateCode
{
get
{
return this.m_OperateCode;
}
set
{
this.m_OperateCode = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -