예제 #1
0
        protected void LoadInfo(int id)
        {
            TemplatePage tp = TemplatePageView.GetModelByID(id.ToS());

            chk_Enable.Checked           = tp.Enable;
            txt_pageName.Text            = tp.PageName;
            txt_FileName.Text            = tp.FileName;
            ddl_CreateWith.SelectedValue = tp.CreateWith.ToS();
            txt_Content.Text             = tp.Content;
        }
예제 #2
0
        protected void btn_Save_Click(object sender, EventArgs e)
        {
            TemplatePage tp = TemplatePageView.GetModelByID(WS.RequestString("id"));

            tp.Content    = txt_Content.Text.ToSqlEnCode();
            tp.CreateWith = ddl_CreateWith.SelectedValue.ToInt32();
            tp.FileName   = txt_FileName.Text;
            tp.PageName   = txt_pageName.Text;

            if (tp.Id > 0)
            {
                TemplatePageView.Update(tp);
            }
            else
            {
                TemplatePageView.Insert(tp);
            }

            CreatePage.CreatePages(tp);

            Js.AlertAndChangUrl("保存成功!", "PageTemplateList.aspx");
        }