notice.aspx.cs

来自「购物系统 完整源码 包括完整的数据库」· CS 代码 · 共 43 行

CS
43
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class Admin_Information_Notice : System.Web.UI.Page
{
	protected void Page_Load(object sender,EventArgs e)
	{	
		if(!Page.IsPostBack)
		{
			BindNotifyData();
		}
	}
	private void BindNotifyData()
	{
		Notify notify = new Notify();
		SqlDataReader recc = notify.GetNotify();
		if(recc.Read())
		{
			Desn.Text = recc["Desn"].ToString();
			Body.Text = recc["Body"].ToString();
		}
		recc.Close();
	}
	protected void SureBtn_Click(object sender,EventArgs e)
	{
		///定义类
		Notify notify = new Notify();
		///修改数据
		notify.UpdateNotify(Desn.Text,Body.Text);
		///显示操作结果信息
		Response.Write("<script>window.alert('修改数据项成功。')</script>");
	}	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?