using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace KstCMS.KstCMS_Manager.WebContent.uPage
{
    public partial class Content : KstCmsBase.WebPage.ValidationPage
    {
        protected string ContentStr = string.Empty;
        string LmId = System.Web.HttpContext.Current.Request.QueryString.Get("LmId");
        protected void Page_Load(object sender, EventArgs e)
        {
            Button1.Click += new EventHandler(Button1_Click);
            if (!IsPostBack)
            {
                GetContent();
            }
        }

        void Button1_Click(object sender, EventArgs e)
        {
            string[] data = new string[] { Request.Form["elm1"] };
            KstCmsBase.DAL.WebLM.Update(data, Convert.ToInt32(LmId), "Content");
            GetContent();
            ShowMsgModle("更新成功！", "location.href=\"Content.aspx?LmId=" + LmId + "\";");
        }

        void GetContent()
        {
            KstCmsBase.Entities.WebLm_ent WebLM = KstCmsBase.DAL.WebLM.Get_WebLMInfo(Convert.ToInt32(LmId), "Content");
            ContentStr = WebLM.Content;
        }
    }
}