温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:新宇科技企业网站系统源码(三层)
当前文件:
XinYuCompanyManageSystem/web/admin/Content.aspx.cs[1K,2009-6-12 11:59:36],打开代码结构图
XinYuCompanyManageSystem/web/admin/Content.aspx.cs[1K,2009-6-12 11:59:36],打开代码结构图1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Collections; 5
using System.Web; 6
using System.Web.Security; 7
using System.Web.UI; 8
using System.Web.UI.WebControls; 9
using System.Web.UI.WebControls.WebParts; 10
using System.Web.UI.HtmlControls; 11
using BLL; 12
using Model; 13
//该源码下载自www.51aspx.com(51aspx.com) 14
15
public partial class admin_Content : System.Web.UI.Page 16
{ 17
protected void Page_Load(object sender, EventArgs e) 18
{ 19
if (Session["Admin_User"] == null) 20
{ 21
Response.Redirect("login.aspx"); 22
Response.End(); 23
} 24
else 25
{ 26
if (!Page.IsPostBack) 27
{ 28
BinData(); 29
} 30
} 31
} 32
33
public void BinData() 34
{ 35
Config config = new Config(); 36
ConfigSystem configSystem = new ConfigSystem(); 37
config = configSystem.Get_Config(); 38
About.Value = config.About; 39
Contact.Value = config.Contact; 40
} 41
42
protected void Update_Btn_Click(object sender, EventArgs e) 43
{ 44
if (Page.IsValid) 45
{ 46
Config config = new Config(); 47
config.About = About.Value.ToString(); 48
config.Contact = Contact.Value.ToString(); 49
ConfigSystem configSystem = new ConfigSystem(); 50
configSystem.Update_Config(config); 51
Response.Write("<script>alert('修改成功');location.href='Content.aspx';</script>"); 52
} 53
} 54
} 55






}
}