Web/admin/notices/Modify.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data.SqlClient;
using System.Data;
public partial class notices_Add : System.Web.UI.Page
{
UBW.BLL.notices bll = new UBW.BLL.notices();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//初始化
chushi();
}
}
/// <summary>
/// 初始化
/// </summary>
protected void chushi()
{
UBW.Model.notices model = bll.GetModel(int.Parse(Request.QueryString["id"].ToString()));
if (model != null)
{
txt_title.Text = model.title;
elm1.Value = model.memo;
}
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
//更新
UBW.Model.notices model = new UBW.Model.notices();
model.nid = int.Parse(Request.QueryString["id"]);
model.title = txt_title.Text;
model.memo = elm1.Value;
bll.Update(model);
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('操作成功,请返回!');location.href='Manage.aspx';</script>");
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。