Web/Admin/Contents/lxwm.aspx.cs

(完整代码) 1KB

using 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 lxwm : ManagePage
    {
        public int Id = 4;
        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 算力,解读结果公开显示在下面。

还没有人解读过这个文件。