Medical/Admin/Models/SystemConfig.aspx.cs
(完整代码) 2KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication.Admin.Models
{
public partial class SystemConfig : System.Web.UI.Page
{
BLL.Models.GZXX_Config bll = new BLL.Models.GZXX_Config();
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
Model.Models.GZXX_Config model = new Model.Models.GZXX_Config();
model = bll.GetConfigModel();
TextBox1.Text = model.SiteName;
TextBox3.Text = model.IndexHtml;
TextBox7.Text = model.SiteTitle;
TextBox8.Text = model.SiteKeywords;
TextBox9.Text = model.SiteDescription;
TextBox2.Text = model.SiteUrl;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Model.Models.GZXX_Config model = new Model.Models.GZXX_Config();
model.IndexHtml = TextBox3.Text;
model.SiteDescription = TextBox9.Text;
model.SiteKeywords = TextBox8.Text;
model.SiteTitle = TextBox7.Text;
model.SiteName = TextBox1.Text;
model.SiteUrl = TextBox2.Text;
if (bll.Update(model))
{
HttpRuntime.Cache["configmodel"] = Tools.SysCache.ReturnSysModelCache("configmodel");
HttpRuntime.Cache["config"] = Tools.SysCache.ReturnSysCache("config");
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "layer.alert('操作成功!', {icon: 1,kin: 'layer-ext-moon',closeBtn: 0 })", true);
}
else {
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "layer.alert('操作失败!', {icon: 2,kin: 'layer-ext-moon',closeBtn: 0 })", true);
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
