admin/NoticeManage.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
public partial class admin_NoticeManage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
show();
}
}
/// <summary>
/// 初始化
/// </summary>
protected void show()
{
StringBuilder strSql = new StringBuilder();
strSql.Append(@"select * from Notice");
//根据编号得到相应的记录
DataSet ds = DbHelperSQL.Query(strSql.ToString());
if (ds.Tables[0].Rows.Count > 0)
{
this.fck_memo.Value = ds.Tables[0].Rows[0]["contents"].ToString();
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
string contents = this.fck_memo.Value;
string strsql = "Update Notice set contents='" + contents + "'";
int n = DbHelperSQL.ExecuteSql(strsql);
if (n > 0)
{
MessageBox.ShowAndRedirect(this, "提交成功!", "NoticeManage.aspx");
}
else
{
MessageBox.Show(this, "提交失败!");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
