📄 webform1.aspx.cs
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace WhiteForum
{
/// <summary>
/// WebForm1 的摘要说明。
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
protected System.Data.SqlClient.SqlCommand sqlSelectCommand1;
protected System.Data.SqlClient.SqlCommand sqlInsertCommand1;
protected System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
protected System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
protected System.Data.SqlClient.SqlConnection sqlConnection1;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
//
// sqlDataAdapter1
//
this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "system_userdd", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("u_num", "u_num"),
new System.Data.Common.DataColumnMapping("p_num", "p_num"),
new System.Data.Common.DataColumnMapping("m_num", "m_num"),
new System.Data.Common.DataColumnMapping("t_no", "t_no"),
new System.Data.Common.DataColumnMapping("t_name", "t_name"),
new System.Data.Common.DataColumnMapping("t_title", "t_title"),
new System.Data.Common.DataColumnMapping("t_tablename", "t_tablename"),
new System.Data.Common.DataColumnMapping("t_up", "t_up"),
new System.Data.Common.DataColumnMapping("t_dtype", "t_dtype"),
new System.Data.Common.DataColumnMapping("t_width", "t_width"),
new System.Data.Common.DataColumnMapping("t_cssname", "t_cssname"),
new System.Data.Common.DataColumnMapping("t_visible", "t_visible"),
new System.Data.Common.DataColumnMapping("t_order", "t_order"),
new System.Data.Common.DataColumnMapping("remark", "remark")})});
this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT u_num, p_num, m_num, t_no, t_name, t_title, t_tablename, t_up, t_dtype, t_" +
"width, t_cssname, t_visible, t_order, remark FROM dbo.system_userdd";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = @"INSERT INTO dbo.system_userdd(p_num, m_num, t_no, t_name, t_title, t_tablename, t_up, t_dtype, t_width, t_cssname, t_visible, t_order, remark) VALUES (@p_num, @m_num, @t_no, @t_name, @t_title, @t_tablename, @t_up, @t_dtype, @t_width, @t_cssname, @t_visible, @t_order, @remark); SELECT u_num, p_num, m_num, t_no, t_name, t_title, t_tablename, t_up, t_dtype, t_width, t_cssname, t_visible, t_order, remark FROM dbo.system_userdd WHERE (u_num = @@IDENTITY)";
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@p_num", System.Data.SqlDbType.VarChar, 10, "p_num"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@m_num", System.Data.SqlDbType.Int, 4, "m_num"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@t_no", System.Data.SqlDbType.VarChar, 20, "t_no"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@t_name", System.Data.SqlDbType.VarChar, 50, "t_name"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@t_title", System.Data.SqlDbType.VarChar, 200, "t_title"));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -