Web/Admin/Contents/gsjj.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using cosmos.Web.UI;
namespace cosmos.Web.Admin.Contents
{
public partial class gsjj : ManagePage
{
public int Id=1;
public cosmos.Model.Contents model = new cosmos.Model.Contents();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//赋值
ShowInfo(this.Id);
}
}
#region 赋值操作
private void ShowInfo(int _id)
{
cosmos.BLL.Contents bll = new cosmos.BLL.Contents();
model = bll.GetModel(_id);
ckeditor.Text = cosmos.Common.Utils.ToTxt(model.Content);
this.lblTitle.Text = model.Title;
}
#endregion
#region 内容管理
protected void btnSave_Click(object sender, EventArgs e)
{
cosmos.BLL.Contents bll = new cosmos.BLL.Contents();
cosmos.Model.Contents model = bll.GetModel(this.Id);
model.Content = cosmos.Common.Utils.ToHtml(ckeditor.Text);
model.PubTime = DateTime.Now;
bll.Update(model);
//保存日志
SaveLogs("[内容管理]公司简介:" + model.Title);
Coolite.Ext.Web.Ext.MessageBox.Alert("提示", "公司简介设置成功").Show();
}
#endregion
protected void btnretset_Click(object sender, EventArgs e)
{
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。